I want to write a simple directive that displays a list of datas from the parent.
The parent controller has something like $scope.datas = [1,2,3,4]
How should I write the directive ?
Use isolated scopes and have something like scope : { display : '=' }
Use children scope and directly reference $scope.datas ?? I found that ugly. I would like to reuse the directive so I want to pass an attribute to indicate which parent field should be used. In other words, I'd like to say to the directives that my datas are either in $scope.datas or $scope.dumpthat.
Thanks !