When working with this straightforward menu item component:
import { Component, Input } from '@angular/core';
@Component({
selector: 'nav-item',
template: `
<a [routerLink]="routeUrl"
routerLinkActive="active-link"
>
</a>
`
})
export class NavItemComponent {
@Input() routerLinkActiveIsDisabled: boolean;
}
I am seeking a way for routerLinkActive
to be selectively applied only on specific items.
How can I adjust the setup so that the routerLinkActive
attribute is omitted when routerLinkActiveIsDisabled
is set to true
?