Apply a mask on an input field so the user can only type pre-determined pattern.
{{x}}
undefined
{{demo.masked.$viewValue}}
A
9
*
?
Set to undefined (uninitialize)
Set to (999) 999-9999
Set to (999) 999-9999 ext. 999
Set to (999) 999-9999 ext. ?9?9?9
Set to (**: AAA-999)
<input type="text" ng-model="phonenumber" ui-mask="(999) 999-9999"/>
Replace "(999) 999-9999" with your desired mask.