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] wrote:
Try as I might, I could not get RouterLink working so instead I've successfully implemented my links this way:

|
<ahref="{{ '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] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
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