angular / router

The Angular 1 Component Router
MIT License
665 stars 135 forks source link

Multiple otherwise #426

Closed isflavior closed 7 years ago

isflavior commented 7 years ago

I've been searching and haven't found any answer. Can i have multiple $routeProvider.otherwise()?

Example:

$routeSegmentProvider.when('/site1', 'site1')
        .when('/site1/page', 'site1.page');

$routeSegmentProvider.when('/site2', 'site2')
        .when('/site2/page', 'site2.page');

How can i define two 404 page? One for each 'site'? If i use the code bellow will redirect to the same page. I want something like: site1/404 and site2/404.

$routeProvider.otherwise({redirectTo: '/404'});