Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to navigate to a different state when defined with base URL and otherwise path #56

Closed
pengx17 opened this issue Feb 22, 2017 · 3 comments
Labels

Comments

@pengx17
Copy link

pengx17 commented Feb 22, 2017

How to reproduce

  • Save a local copy of the official helloworld app
  • Move all files to a subfolder, e.g., {home}/sub
  • add <base href="/sub/"> to index.html
  • turn off useHash for UIRouterModule.forRoot and add an otherwise rule { }
    @NgModule({
    imports: [ 
      BrowserModule,
      UIRouterModule.forRoot({ states: [ helloState, aboutState ], otherwise: { state: 'hello' } })
    ],
    declarations: [ App, Hello, About ],
    bootstrap: [ App ]
    })
    class RootAppModule {}
  • serve the app from {home}/ and go to the local app. The hello state can be successfully redirected, but when I click the about link, nothing happens (should expect to navigate to about state).

The issue does not occur either when there is no base url or otherwise rule.

@christopherthielen
Copy link
Member

I believe this will be fixed in the next release by b858bd6

@christopherthielen
Copy link
Member

Confirmed, it works when built off ui-router-core/master and ui-router-ng2/master.

https://gist.github.com/christopherthielen/1a27f76c352e97d871cd726d0a4f2efd

@kolkov
Copy link

kolkov commented Mar 6, 2017

Confirmed!
Solved with beta.5!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants