I am trying to build a localized app in Angular 2.   I want the currently 
selected locale to show up in the routes like this: 
 www.myapp.com/en-US/home 

My routes are configured like this:

{
path: ':locale/home',
component: HomeComponent
}

My anchor tags are configured like this:

<a routerLink="en-US/home">Childcare</a>


I want the locale ("en-US") to be data-bound to a locale variable in my 
component instead of hard coding the value in the routerLink attribute. 

How do I do this?



-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to