Having a value containing routerLink
and queryParams
, I am attempting to bind it in the HTML.
anchorValue : string = `<a [routerLink]="['../category/new ']" [queryParams]="{ query: 'category' }" routerLinkActive = "router-link-active"> Add category</a>`
When utilizing the following HTML:
<mat-hint [innerHTML]="anchorValue"></mat-hint>
The value gets bound to the mat-hint
, but the anchor link does not work. Any suggestions on how to make it work?
If I try using this code instead:
<mat-hint>
{{anchorValue}}
</mat-hint>
I end up with the following output: