angular-ui-router-redirect
v0.0.3
Published
redirect state to another state
Downloads
6
Maintainers
Readme
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
})