Skip to content
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
@0x-r4bbit

Description

@0x-r4bbit

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions