How to bind the the value in Angular

Viewed 49

I have below template, how to bind the defaultRelatedGuideUrl from the controller to the template?

[routerLink]="(editMode || readOnly) ? [] : ['/defaultRelatedGuideUrl/', link.slug]">

Controller:

@Input() defaultRelatedGuideUrl = 'myparam';
1 Answers

Use this syntax:

[routerLink]="(editMode || readOnly) ? [] : ['', defaultRelatedGuideUrl, link.slug]">
Related