I want to do something like this:

<div ng-repeat="item in items" ng-bind-templateUrl="path/to/{{item.templateName}}.html" id="item.id"></div>

Is there any way to do this?

有帮助吗?

解决方案

Use ng-include to embed templates into elements.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top