title: How do I set attibutes of a component from an Angular directive
body: <p>I am trying to write an attribute directive that will set the attributes of a host Angular component. I have seen examples that are setting the attributes of native host elements e.g class. I want to use this directive to set the properties of the ngx-spinner component so that I don't have to repeat myself everywhere that I use the spinner. I've tried using the @HostBinding() directive e.g.</p>
  <pre><code>import { Directive, HostBinding } from '@angular/core';
  
  @Directive({
    selector: '[appSpinner]',
  })
  export class SpinnerDirective {
    @HostBinding('type')
    type = 'ball-spin-clockwise-fade';
  
    constructor() {}
  }
  </code></pre>
  <p>But this does not seem to work. What am I missing?</p>