Ion-Input Mask


Hey there, I searching for a method to restrict some input.
I need a input field which only allows to enter numbers like _ _ _ _ - _ _ (for example 0200-10) i tried the ionic input mask (here) but i got some errors.

Error: Template parse errors:
‘input-mask’ is not a known element:

  1. If ‘input-mask’ is an Angular component, then verify that it is part of this module.

  2. If ‘input-mask’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message. ("

         [ERROR ->]<input-mask mask="(0) ____-__" allowedChars="0-9" type="number"></input-mask>

I already include the input-mask module in app.module.ts but this still does not work. Do you guys have any idea what to do or where i have to additionally include the input-mask module OR how I can restrict the input?

best regards


I got it to work, ty anyway xD


were you able to get input masking to work using this?