Why is my external template not rendering items using ng-repeat ?
--- AngularJS 1.1.5
I stumbled on this bug but I'm not sure if it's the same issue? If it is are there any work arounds?
Here's a Plunker using a static list but the solution needs to support two way binding because the data is dynamic. ( That's how it's supposed to work anyway... )
controller
.controller('main', ['$scope',function($scope) {
$scope.items = ['a','b','c'];
}])
directive
.directive('items', function() {
return {
restrict: 'E',
replace: true,
controller: 'main',
templateUrl: 'items.html',
link: function(scope, controller) {
}
};
})
items.html
<div ng-repeat="item in items">
{{item}}
</div>