Skip to content

Best Practice way to support URL aliases? #1857

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

Closed
rwillmer opened this issue Apr 3, 2015 · 4 comments
Closed

Best Practice way to support URL aliases? #1857

rwillmer opened this issue Apr 3, 2015 · 4 comments
Labels

Comments

@rwillmer
Copy link

rwillmer commented Apr 3, 2015

I need to support multiple URLs for the same state (reason: support for legacy code)

Is there an agreed best practice way to do this? I've seen this issue #185, but it doesn't seem to reach a conclusion about the right way to do it.

@nateabele
Copy link
Contributor

Currently the only accepted convention for this is $urlRouterProvider.when(). There are no higher level APIs for multiple URLs at the moment.

@nateabele
Copy link
Contributor

Oh, alternatively, you could implement a custom UrlMatcher that accepts multiple UrlMatchers as arguments.

@fxck
Copy link

fxck commented Jan 28, 2016

has anyone written such custom UrlMatcher yet?

this is major pain in the ass, when you are working on a site with multiple languages, and it would take me a good while to try and understand the 1000 loc https://github.com/angular-ui/ui-router/blob/master/src/urlMatcherFactory.js and write a custom version of it..

@stale
Copy link

stale bot commented Jan 24, 2020

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.

This does not mean that the issue is invalid. Valid issues
may be reopened.

Thank you for your contributions.

@stale stale bot added the stale label Jan 24, 2020
@stale stale bot closed this as completed Feb 7, 2020
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