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