Tyler Frankenstein's Drupal Association Membership Tyler Frankenstein GItHub Link

Angular JS Change Route Programmatically

Category: 
Tags: 

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

$location.path('/foo');

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:

$route.reload();

Add new comment