Skip to content

Instantly share code, notes, and snippets.

@rbosneag
Created June 15, 2015 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rbosneag/c4a1db35958572440e97 to your computer and use it in GitHub Desktop.
Save rbosneag/c4a1db35958572440e97 to your computer and use it in GitHub Desktop.
404 state
$stateProvider.state('main.redirectINITIAL', {
//url: '/redirect',
views: {
'main.content@': {
//templateUrl: '/redirect.html',
template: '<meta http-equiv="refresh" content="0;URL=/" />',
controller: function($rootScope) {
//$rootScope.gotoHome = true;
}
}
}
});
$urlRouterProvider.otherwise(
function($injector, $location) {
$injector.invoke(['$state', function($state) {
$state.go('main.redirectINITIAL',{"url":$location.$url});
}]);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment