I am trying to use an ng-repeat
that includes an ng-include
. The problem is that the first element in the ng-repeat is just the ng-include
Using a directive worked for me: https://stackoverflow.com/a/24673257/188926
In your case:
1) define a directive:
angular.module('myApp')
.directive('mytemplate', function() {
return {
templateUrl: 'views/template.html'
};
});
2) use your new directive:
... or if you're concerned about HTML validation: