Skip to main content
adicionou 79 caracteres ao conteúdo
Fonte Link
novic
  • 36,7mil
  • 4
  • 32
  • 70

Para funcionar corretamente utilize esse endereço:

https://assisrafael.github.io/angular-input-masks/javascripts/masks.js

que já é o arquivo com tudo que precisa para executar essas mascaras no

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {
    $scope.phoneNumber = "";
  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.6/angular-locale_pt-br.js"></script>
<script src="https://cdnjsassisrafael.cloudflaregithub.com/ajax/libsio/angular-input-masks/2.6.0javascripts/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks.br.js"></script>

<div ng-app="demo" ng-controller="ctrl">
<h4>ui-number-mask</h4>
  <p>
    <input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
  <p>
    <input type="text" name="field"name="field5" ng-model="number" ui-number-mask ui-hide-group-sep>
  </p>

<h4>ui-br-phone-number</h4>
<p><input type="text" name="field10" ng-model="phoneNumber" ui-br-phone-number></p>

<h4>ui-br-cep-mask</h4>
<p><input type="text" name="field11" ng-model="cep" ui-br-cep-mask></p>

<h4>ui-br-cpf-mask</h4>
<p><input type="text" name="field12" ng-model="initializedCpf" ui-br-cpf-mask></p>

<h4>ui-br-cnpj-mask</h4>
<p><input type="text" name="field13" ng-model="initializedCnpj" ui-br-cnpj-mask></p>

<h4>ui-br-cpfcnpj-mask</h4>
<p><input type="text" name="field14" ng-model="initializedCpfCnpj1" ui-br-cpfcnpj-mask></p>

<h4>ui-br-ie-mask</h4>
<p>
<select ng-init="ufs=['AC','AL','AM','TO']" ng-model="selectedUF" ng-options="uf for uf in ufs"></select>
<input type="text" name="field19" ng-model="ieField" ui-br-ie-mask='selectedUF'></p>

</div>

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.6/angular-locale_pt-br.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks.br.js"></script>

<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p>



</div>

Para funcionar corretamente utilize esse endereço:

https://assisrafael.github.io/angular-input-masks/javascripts/masks.js

que já é o arquivo com tudo que precisa para executar essas mascaras no

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {
    $scope.phoneNumber = "";
  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.6/angular-locale_pt-br.js"></script>
<script src="https://assisrafael.github.io/angular-input-masks/javascripts/masks.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>


<div ng-app="demo" ng-controller="ctrl">
<h4>ui-number-mask</h4>
  <p>
    <input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
  </p>
  <p>
    <input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
  <p>
    <input type="text" name="field5" ng-model="number" ui-number-mask ui-hide-group-sep>
  </p>

<h4>ui-br-phone-number</h4>
<p><input type="text" name="field10" ng-model="phoneNumber" ui-br-phone-number></p>

<h4>ui-br-cep-mask</h4>
<p><input type="text" name="field11" ng-model="cep" ui-br-cep-mask></p>

<h4>ui-br-cpf-mask</h4>
<p><input type="text" name="field12" ng-model="initializedCpf" ui-br-cpf-mask></p>

<h4>ui-br-cnpj-mask</h4>
<p><input type="text" name="field13" ng-model="initializedCnpj" ui-br-cnpj-mask></p>

<h4>ui-br-cpfcnpj-mask</h4>
<p><input type="text" name="field14" ng-model="initializedCpfCnpj1" ui-br-cpfcnpj-mask></p>

<h4>ui-br-ie-mask</h4>
<p>
<select ng-init="ufs=['AC','AL','AM','TO']" ng-model="selectedUF" ng-options="uf for uf in ufs"></select>
<input type="text" name="field19" ng-model="ieField" ui-br-ie-mask='selectedUF'></p>

</div>

adicionou 79 caracteres ao conteúdo
Fonte Link
novic
  • 36,7mil
  • 4
  • 32
  • 70

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masksi18n/21.6.06/angular-input-maskslocale_pt-standalone.minbr.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/stringangular-maskinput-masks/02.36.0/stringangular-maskinput-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks.br.js"></script>

<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p> 



</div>

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/string-mask/0.3.0/string-mask.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p>

</div>

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.6.6/angular-locale_pt-br.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks.br.js"></script>

<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p> 



</div>

adicionou 79 caracteres ao conteúdo
Fonte Link
novic
  • 36,7mil
  • 4
  • 32
  • 70

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/string-mask/0.3.0/string-mask.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p>

</div>

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/string-mask/0.3.0/string-mask.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p>

</div>

angular.module('demo', ['ui.utils.masks'])
  .controller('ctrl', function($scope) {

  });
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.28/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-input-masks/2.6.0/angular-input-masks-standalone.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/string-mask/0.3.0/string-mask.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<div ng-app="demo" ng-controller="ctrl">
<p>
<input type="text" name="field1" ng-model="number1" ui-number-mask ui-number-min="0">
</p>
<p>
<input type="text" name="field2" ng-model="number2" ui-number-mask="3" ui-number-min="0">
</p>
<p>
<input type="text" name="field3" ng-model="number3" ui-number-mask="4" ui-negative-number ui-number-min="0">
</p>
<p>
<input type="text" name="field4" ng-model="number4" ui-number-mask ui-number-min-max="100.9" ui-number-min="10.1"></p>
<p>
<input type="text" name="field" ng-model="number" ui-number-mask ui-hide-group-sep>
</p>

</div>

adicionou 79 caracteres ao conteúdo
Fonte Link
novic
  • 36,7mil
  • 4
  • 32
  • 70
Carregando
Fonte Link
novic
  • 36,7mil
  • 4
  • 32
  • 70
Carregando