title: Add attribute to an element dynamically with Angular
body: <p>Is there a way to turn a string from a component member to a dynamic attribute in component HTML with Angular?</p>
  
  <pre><code>export class ContextualMenuComponent implements OnInit {
  directive: string;
  
  constructor() { }
  
  ngOnInit() {
     this.directive = "mat-mini-fab";
  }
  </code></pre>
  
  <p>And then in html something like this</p>
  
  <pre><code>&lt;button [directive]&gt;click&lt;/button&gt;
  </code></pre>
  
  <p>but I want it to actually come out as</p>
  
  <pre><code>&lt;button mat-mini-fab&gt;click&lt;/button&gt;
  </code></pre>