简体   繁体   中英

AngularJS - watching the scope of directive's controller

I've built a plunker to test things out, but I must not be understanding some angular fundamentals.

Why is the directive's link function not able to watch a property (scope.featureAttributes) on the directive's controller's scope.

http://plnkr.co/edit/rWG5NEp6TRYfP7l1HHDw

thanks for your help

You use $watchCollection . The plnkr includes Angular 1.0.8. $watchCollection was introduced in a later version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM