SyntaxFix
Write A Post
Hire A Developer
Questions
I think a custom ControlValueAccessor is the best option.
Not tested but as far as I remember, this should work:
<input [(ngModel)]="value" pattern="[0-9]">