Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Merge pull request #844 from Gym/404-behavior
Browse files Browse the repository at this point in the history
mask exception route for 404 responses.
  • Loading branch information
lirantal committed Aug 23, 2015
2 parents cfe71bb + 9fdd2a0 commit b8147cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/core/client/config/core.client.routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ angular.module('core').config(['$stateProvider', '$urlRouterProvider',
function ($stateProvider, $urlRouterProvider) {

// Redirect to 404 when route not found
$urlRouterProvider.otherwise('not-found');
$urlRouterProvider.otherwise(function ($injector, $location) {
$injector.get('$state').transitionTo('not-found', null, {
location: false
});
});

// Home state routing
$stateProvider
Expand Down

0 comments on commit b8147cb

Please sign in to comment.