I have an object that I want to see inside the directive.
The directive has an isolated scope, and the object comes from the parent controller.
DOM:
<div hello-directive obj-to-track="{{myObj}}"></div>
JS Directive:
scope:{ objToTrack:'@' }, link:function(scope,element,attrs){ scope.$watch(function(newValue){
In any case, to get the real object from the parent controller other than JSON.parse()
Thanks.
source share