FAQ Database Discussion Community


How to use an isolated scope property properly?

angularjs,angularjs-directive,angularjs-watch,controlleras
How to use an isolated scope property properly? I have a directive, that is called from a page controller, with an attribute item passed to it, e.g. <my-directive item="myItem"></my-directive>, containing an id. The code below will not work, as it seems like $scope.item is undefined in the controller.. like I'm...