I\'ve written part of a web application in Angular. To ensure that all routes are covered, I wanted to add a redirectTo property to the $routeProvider
redirectTo
$routeProvider
You could do something like this:
$routeProvider.when('/404', { controller: ['$location', function($location){ $location.replace('/'); }] }).otherwise({ redirectTo: '/404' });
It is essentially the same thing, only it uses less code.