I want to add material button directive to button element. But there are several types of button, how to set angular material2 directive according to button type? The code is:
<button mat-buttton color="{{button.color}}" buttonType="{{button.type}}"></button>
That mat-button is an angular material2 directive to set some effects for button. For example when button.type is 'stroked' mat-button should be change to mat-stroked-button or if button.type is 'flat' mat-button should be change to mat-flat-button.