Problems with angular-input-masks?

2

I'm trying to use this module that is available in the github and I think this module is very complete, it provides the masks that I need, however its documentation is very confusing.

The question is as follows, I cloned the gihub project and went to run the demo , in the lines of code index ( lines 8 and 9 ), it references the Javascript files that should be in the repository, but they are not, they just do not exist but do not need to panic, a href="http://www.applebees.com.br/scripts/fim-de-ano/angular-input-masks/"> in this link .

When doing the references, linking the files Javascript to HTML , everything right, was to work the [demo], however it presents some errors, for example:

  

wherewithinthefile angular-input-masks-dependencies.js is the comrade of error :

function min () 
{
    var args = [].slice.call(arguments, 0);
    return pickBy('isBefore', args);
}

Can anyone help me use this module without errors?

    
asked by anonymous 06.09.2017 / 21:33

1 answer

3

To work properly use this address:

  

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

That's already the file with everything you need to run these masks on the

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><scriptsrc="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><scriptsrc="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><divng-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>
    
06.09.2017 / 22:56