I wanted to change mat-button type dynamically based on certain conditions. This requires changing an attribute of <button> element dynamically. What is the best way to do that? 
Below is a stackblitz with basic setup.
https://stackblitz.com/edit/angular-material-change-btn-type
I've seen this post. But there are total 8 button types and I think probably it won't be a good solution to add 8 conditions and bind them to a variable. Is there any better alternative?
 
     
    