Reputation: 85
Currently working on an html template using angular, and I have this code:
<a mat-list-item class="side-link" [routerLinkActive]="['is-active']" [routerLink]="[{outlets: { agent-sidebar: ['agent-manage-clients'] } }]"><i class="fas fa-user mr-3"></i>Clients</a>
As you can see, there's nothing wrong with the code. However, doing an ng build
produces an error whereas the compiler is looking for a missing :
token where I think is unnecessary.
Upvotes: 0
Views: 157
Reputation: 85
So apparently, I've fixed this bug of mine by changing the name of my router-outlet. It turns out that naming my outlet agent-sidebar
with the token -
messes up the compiler somehow. So after almost half a day of work, I've changed this:
[routerLink]="[{outlets: { agent-sidebar: ['agent-manage-clients'] } }]"
to this:
[routerLink]="[{outlets: { agentSidebar: ['agent-manage-clients'] } }]"
and compiler is now working properly.
Upvotes: 1