0.0.3 • Published 7 years ago

angular-ui-router-redirect v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

install

npm install --save angular-ui-router-redirect

usage

// add dependency in you module
angular.module('app', [
  'ui.router',
  'ui.router.redirect'
]);

and finally, in your states, just use the key redirectTo with a state to redirect, e.g.

angular
  .module('app')
  .config(HomeConfig)

function HomeConfig($stateProvider) {
  $stateProvider.state('home', {
    url: '/',
    redirectTo: 'users' // name of state to go
  })