In Angular 2 if I have an element like how can I conditionally add an attribute directive like [routerLink]=\"[\'SomeRoute\'
[routerLink]=\"[\'SomeRoute\'
If you don't want to duplicate the element, and just want to prevent clicks depending on the condition, you could do the following: