I am trying to create links with a list of urls dynamically:
<span *ngIf="item.type=='link'">
<a class="nav-link" [routerLink]="item.routerLink" skipLocationChange>{{item.label}}</a>
</span>
this solution is working fine when I am running dev in my localhost, but I get the following error when trying to build my library:
RROR: Can't bind to 'routerLink' since it isn't a known property of 'a'. ("<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
<a class="navbar-brand" [ERROR ->][routerLink]="navBar.routerLink" skipLocationChange><img src="{{navBar.imagePath}}" height="40px" wid")
Can't bind to 'routerLink' since it isn't a known property of 'a'. ("item':'nav-item dropdown'">
<span *ngIf="item.type=='link'">
<a class="nav-link" [ERROR ->][routerLink]="item.routerLink" skipLocationChange>{{item.label}}</a>
</span>
this is the list of my dependencies:
"@angular/animations": "~8.2.9",
"@angular/common": "~8.2.9",
"@angular/compiler": "~8.2.9",
"@angular/core": "~8.2.9",
"@angular/forms": "~8.2.9",
"@angular/platform-browser": "~8.2.9",
"@angular/platform-browser-dynamic": "~8.2.9",
"@angular/router": "~8.2.9",