<input type="text" id="cpfcnpj" ng-model="PersonalIdentificationNumber" ui-mask-placeholder="" ui-mask="000.000.000-00" name="PersonalIdentificationNumber" model-view-value="true" required="" readonly="" class="ng-pristine ng-not-empty ng-valid ng-valid-required ng-touched">
But when I receive data to fill the input and apply that same data to the ng-model:
I have the following input:
<input type="text" id="cpfcnpj" ng-model="PersonalIdentificationNumber" ui-mask-placeholder="" ui-mask="000.000.000-00" name="PersonalIdentificationNumber" model-view-value="true" required="" readonly="" class="ng-pristine ng-not-empty ng-valid ng-valid-required ng-touched">
But when I receive data to fill the input and apply that same data to the ng-model:$scope.PersonalIdentificationNumber = result.Result.PersonalIdentificationNumber;
The mask is not being properly formatted. Instead of
000.000.000-00
I get00000000000
.Already tried this solution and also with:
$("#cpfcnpj").attr('mask', '000.000.000-00');
But none of them works.