Route Resolve and Controller Activate in AngularJS
Posted by: JohnPapa.net,
on 27 Dec 2014 |
View original | Bookmarked: 0 time(s)
Angular route resolvers and controller activation. Two great options for running logic on entrance of a new View or route. I get a lot of questions about which technique to use. I’m using AngularJS and I see 2 common patterns to retrieve data and run logic when transitioning to a new View. What’s the difference between running code when a controller starts and running code in a route resolver? The key is that both are valid options. And in some cases either is fine, while in others you...