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

Add $scope.watch inside a directive

user598 Published in July 20, 2018, 5:03 am

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.315731 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO