Angularjs refresh data from service when route changes

Angularjs refresh data from service when route changes. Simply update the data from the service when the route changes, here is an example.

Controller

Service

refs:
https://stackoverflow.com/questions/17882560/best-idiomatic-way-to-refresh-data-from-a-service-in-angularjs

Sam Deering

Sam Deering

Sam is a web developer, online entrepreneur and investor. In his spare time he enjoys coding, playing chess and sharing what he learns with others.

One thought on “Angularjs refresh data from service when route changes

Leave a Reply

Your email address will not be published. Required fields are marked *