Reputation: 345
I am using angular material and ngx-form-schema in an angular 7 project. How can create a directive to handle all type of mat buttons? I want to send type of mat button such 'mat-flat-button' or 'mat-raised-button' to that directive then the directive show that mat button.
Upvotes: 0
Views: 1126
Reputation: 1062
Create two buttons. One with mat-flat-button
, one with mat-raised-button
. Then use *ngIf
or ngSwitch
to display only one at a time.
Upvotes: 2