A directive to format phone number

后端 未结 7 1815
梦毁少年i
梦毁少年i 2021-01-02 00:33

I was wondering how to automatically format a number in an input field using an angularjs directive? When I type in an input field say 6042919283 I want it to be shown as 6

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-02 01:10

    You could use UI Utils mask It allows you to define an allowd input format and will handle the validation for you as well as the formatting

提交回复
热议问题