Home Add $scope.watch inside a directive
Reply: 0

Add $scope.watch inside a directive

Ankur Rai
1#
Ankur Rai Published in 2017-11-14 19:49:19Z

I have an html page which calls the controller and directive at page refresh. So when I edit the id, the $scope.watch in the controller checks for the value change and updates certain field but the directive is not called. So the html page shows old values and not the updated values, unless page refreshed.

I added $scope.watch in the directive but it is loaded only when the page is refreshed.

So how can I track the change and then call the function in the directive?

My controller and directive are in two different js files.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.332145 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO