I am using Material 2 to add md-raised-button. I want to apply this directive only if certain condition becomes true.
md-raised-button
For example:
<
Use NgClass
NgClass
[ngClass]="{ 'mat-raised-button': trueCondition }"
example of true condition:
this.element === 'Today'
or a boolean function
getTruth()
full example:
TEXT
If you want a default class: