I can use ngClass to apply a CSS class based on the value of a boolean. However, can I do the opposite? Is it possible to change the value of a boolean based on the existence of a CSS class? Looking around, I cannot find a way to do this in Angular templates.
For context, I'm using routerLinkActive to apply a class if the link is active. What I actually need to do is set a boolean value if the link is active.
Routerclass, and just check the value in your .ts file