title: Angular 6 numberonly directive not working
body: <p>I have created a directive from <a href="https://www.davebennett.tech/angular-4-input-numbers-directive/" rel="noreferrer">https://www.davebennett.tech/angular-4-input-numbers-directive/</a> so that I can restrict users to input only digits in phone number. In <code>src/app/app.sharerd.module.ts</code> file, I did the below code to import the directive:</p>
  
  <pre><code>import { NumberOnlyDirective } from './number.directive';
  declarations: [..., ..., NumberOnlyDirective], ...
  export class SharedModule { }
  </code></pre>
  
  <p>Now, under <code>/src/</code> folder I have created folders named <code>modules/auth/component/</code>.</p>
  
  <p>Under <code>auth.module.ts</code> within the <code>/src/auth/</code> folder, I have done the following:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { SharedModule } from '../../app/app.shared.module';
  ...
  ...
  </code></pre>
  
  <p>Now, in the <code>signup.html</code> under <code>/src/auth/component/</code>:</p>
  
  <pre><code>&lt;input type="text" name="phone" myNumberOnly ... &gt; ...
  ...
  </code></pre>
  
  <p>I can still enter characters / special chars etc into the text box however, I did not see any error in console/cli.</p>