title: Pass parameter to Angular 4 directive on input
body: <p>I have an input text field like this</p>
  
  <pre><code>&lt;input type="text" class="form-control"  [inputTextFilter]="A" [ngModel]="name"&gt;
  </code></pre>
  
  <p>and my directive is:</p>
  
  <pre><code>import { Directive, Input, HostListener } from '@angular/core';
  
  @Directive({
    selector: '[inputTextFilter]'
  })
  
  export class InputTextFilterDirective {
    @Input('inputTextFilter') params: string;
  
    @HostListener('keypress', ['$event'])
    onKeyUp(event: KeyboardEvent) {
      console.log('got parameters: '+this.params);
    }
  }
  </code></pre>
  
  <p>and I have created a Directive called "inputTextFilter" to which I want to pass the "A" parameter.  My passed parameter always shows as undefined.</p>