1
I would like to know how to use the angular-input-masks. I did all the steps said in the same, but I couldn’t make it work.
I’m using Angularjs, here’s my index page.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CEP Spec</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script src="../node_modules/angular-input-masks/releases/angular-input-masks-dependencies.js"></script>
<script src="../node_modules/angular-input-masks/releases/angular-input-masks.br.js"></script>
<script>
angular.module('app', ['ui.utils.masks']);
</script>
</head>
<body ng-app="app">
<form name="form" ng-controller="ctrl">
<h2>ui-br-cep-mask</h2>
<input type="text" name="field17" ng-model="initializedCep" ui-br-cep-mask><br>
<span ng-bind="initializedCep"></span> - {{form.field17.$error}}<br>
<br>
<input type="text" name="field18" ng-model="cep" ng-model-options="{allowInvalid:true}" ui-br-cep-mask><br>
<span ng-bind="cep"></span> - {{form.field18.$error}}<br>
<br>
</form>
</body>
</html>
Edith your question and put the code you have tried and failed!
– NoobSaibot
Enter the correct dependency:
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/4.1.0/angular-input-masks-standalone.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/4.1.0/angular-input-masks.br.min.js"></script>
– Atila Silva