This repository was archived by the owner on Feb 26, 2024. It is now read-only.
Is there something like we know as .otherwise()
in the new router? #110
Open
Description
While it is pretty clear, how to force a redirect from one path to another path like this:
function AppController($router) {
$router.config([
{
path: '/',
redirectTo: '/welcome'
},
{
path: '/welcome',
component: 'welcome'
]);
}
I wonder if there's also a way to map any path, that doesn't match any specific configuration, to a defined component/path. So basically the equivalent of:
app.config(function ($routeProvider) {
$routeProvider
.when('/foo', {
...
})
.otherwise('/foo');
});
Is there something like this in the new router or at least planned?