Hi All,
I am facing problem with ng-repeat in custom directive. I can see there are
lot of people had this problem, but I could not see any solution:
Here is my design:
I have a main page main.html, I used custom directive there e.g.
main.html:
<html >
<body ng-app="myApp">
<my-dir> <my-dir>
</body>
My directive is look like below:
app.directive('myDir',function(){
var directive = {};
directive.restrict='E';
directive.templateUrl=*'/a/b.html';*
return directive;
});
in my b.html, I am using ng-repeat
<div ng-controller='MyController'>
//some static content
<div ng-repeat="page in pages">
<div ng-include="page.url">
<div>
//button to Add pages
</div>
MyController is look like below:
controller= function($scope){
$scope.addPage=//function to add page in pages variable of scope
}
I would be thankful, if anyone have solution for this issue.
Thanks!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.