Thank you for your suggestions but both versions of your code just crashed.



On Monday, June 5, 2017 at 11:33:41 AM UTC-7, Alex Alex wrote:
>
> Try something like this:
>
> let breadcrumb.url = 'foo123'
>
> <a [routerLink]="`dashboard/${breadcrumb.url}`">{{breadcrumb.label}}</a>
>
>
> [attributesInSquareBracket] are translated to JS.
>
> or without brackets:
>
> <a routerLink="{{`dashboard/${breadcrumb.url}`}}">{{breadcrumb.label}}</a>
>
> On 06/05/2017 08:51 PM, [email protected] <javascript:> wrote:
>
> Try as I might, I could not get RouterLink working so instead I've 
> successfully implemented my links this way: 
>
> <a href="{{ 'dashboard' + breadcrumb.url }}" class="link" (click)=
> "navigateToRoute(breadcrumb)">{{breadcrumb.label}}</a>
>
> Here's a sample URL that I'm striving to attain:
>
> http://localhost:4200/dashboard/countries/22/states/53
>
> Given this, what syntax would you use with RouterLink?
>
> <a [routerLink]="????">{{breadcrumb.label}}</a>
>
> Trust me when I say that I've tried ten different approaches.  As 
> "dashboard" is not part of what I get out of ActivatedRoute, I had to 
> introduce it "manually" in code.  I'd always seem to end up with 
> "/dashboard/dashboard" though.
>
> Puzzling!
>
> Robert
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Angular and AngularJS discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" 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