Localized URLs, Named Routes

14 views
Skip to first unread message

Juan David Arroyave Henao

unread,
Sep 22, 2016, 3:41:24 AM9/22/16
to AngularJS
Hi all!

We are currently trying to have named routes in our SPA. Depending on the language, we should have:


www.website.com/help

www.website.com/ayuda

www.website.com/hifen


Also, in our references, we should be able to configure:  href=“/help” or href=“/ayuda” depending on the language.


Does Angular 2 router support this?

(if not, how can we achieve this?)

Sander Elias

unread,
Sep 23, 2016, 12:29:00 AM9/23/16
to AngularJS
Hi Juan,

There are different way's this can be done. Simplest way is just add all the names to the route-config. The downside of this is that your config will get large, and maintainability will go down.
However, you are able to read the routers config, amend and reset it, that's also an option.

Regards
Sander
Reply all
Reply to author
Forward
0 new messages