default route

This commit is contained in:
Mo Bitar
2017-01-10 23:09:28 -06:00
parent 1ab7858bc3
commit 7459df9b5a
3 changed files with 3 additions and 23 deletions

View File

@@ -17,20 +17,10 @@ angular.module('app.frontend')
}
})
// 404 Error
.state('404', {
parent: 'base',
views: {
'content@' : {
templateUrl: 'frontend/errors/404.html'
}
}
});
// Default fall back route
$urlRouterProvider.otherwise(function($injector, $location){
var state = $injector.get('$state');
state.go('404');
state.go('home');
return $location.path();
});

View File

@@ -412,22 +412,12 @@ angular.module('app.frontend', ['ui.router', 'restangular', 'ngDialog']).config(
controller: 'HomeCtrl'
}
}
})
// 404 Error
.state('404', {
parent: 'base',
views: {
'content@': {
templateUrl: 'frontend/errors/404.html'
}
}
});
// Default fall back route
$urlRouterProvider.otherwise(function ($injector, $location) {
var state = $injector.get('$state');
state.go('404');
state.go('home');
return $location.path();
});

File diff suppressed because one or more lines are too long