Skip to content

$urlRouterProvider's when function has redirection problems #2496

Closed
@nmrm

Description

@nmrm

$urlRouterProvider has a problem if the incoming path that I want to redirect is empty and there is a state with an url that is also empty.

If I declare something like:

    $urlRouterProvider
        .when('','/staff')
        .otherwise("/error");

and then I declare a named state with an empty "url"...

When calling the webapp in it's root format, http://host:port/webapp

  1. Chrome, ignores the $urlRouterProvider and jumps into the state with the empty url (bug).
  2. IE and Firefox works fine following the rule in the $urlRouterProvider, jumping into the state that has the '/staff' associated url.

The 1) glitch started happening since lib version 0.2.16 and only in Chrome browsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions