Recently, I've been working on a tab component called TabComponent and it includes the following HTML template:
<a [routerLink]='link' [routerLinkActive]="[is-active]">link label</a>
<button>Close tab</button>
The challenge I'm facing is how to access the value of the [routerLinkActive] property within the component class. Essentially, I need to retrieve a variable that indicates whether this routerLink is currently active. Any suggestions on how to achieve this?
UPDATE: I have started thinking that if I could somehow access the CSS class of the <a>
link tag, it might solve my problem. Is there a way to do this?