Personalized and localized input masks for AngularJS
With Bower:
bower install --save angular-input-masks
-
Include the module
ui.utils.masks
in your angular app. -
Include the directive
ui-number-mask
in your form:
<input type="text" name="field" ng-model="field" ui-number-mask>
- You can set the number of decimals (the default is 2):
<input type="text" name="field" ng-model="field" ui-number-mask="3">
- You can allow negative numbers using the
ui-negative-number
attribute:
<input type="text" name="field" ng-model="field" ui-number-mask="3" ui-negative-number>
- See more examples and other masks in
demo/index.html
Uses Protractor.
Run throug gulp:
gulp test