Angular JS Change Route Programmatically


Sometimes we'll want to dynamically change the route in Angular during some custom code execution. Here's how we can do it:


If your call to $location takes place in an async success callback (i.e. after making a POST request to a server), you may also have to reload the route:


Add new comment