Opinionated angular input masks. Provides ready to use masks with little (br/inscricao-estadual) to no configuration (number, cnpj, etc).
npm install --save angular-input-masks
angular-input-masks-standalone.min.js
script in your page. For example:<script src="https://github.com/assisrafael/angular-input-masks/raw/master/angular-input-masks-standalone.min.js"></script>
Obs: for npm the build scripts are available inside releases
folder.
ui.utils.masks
in your angular app. For example:angular.module('app', ['ui.utils.masks']);
angular.module('demo', [require('angular-input-masks')]);
Some masks are internationalized, so you need to include the proper angular-locale in your app(see: https://docs.angularjs.org/guide/i18n).
<input type="text" name="field" ng-model="number" ui-number-mask>
<input type="text" name="field" ng-model="number" ui-number-mask="3">
See more usage examples in the Demo page
If you are using npm (without browserify):
If you are using npm with browserify:
require('angular-input-masks')
: provides all directivesrequire('angular-input-masks/br')
: only global and BR directivesrequire('angular-input-masks/us')
: only global and US directivesrequire('angular-input-masks/fr')
: only global and FR directivesLooking for related filters? Take a look at angular-br-filters
npm install
npm run build
npm run test:unit
src/**/*.spec.js
npm run test:e2e
npm test