Javascript 掩码未应用于具有ng模型的输入
我有以下意见:Javascript 掩码未应用于具有ng模型的输入,javascript,angularjs,Javascript,Angularjs,我有以下意见: <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-
<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">
掩码的格式不正确。我得到的不是000.000.000-00
,而是00000000000
已经尝试过此解决方案,并且使用:$(“#cpfcnpj”).attr('mask','000.000.000-00')代码>但它们都不起作用。请尝试使用以下方法:
角度直接不提供用户界面屏蔽。请尝试使用以下方法:
不提供用户界面屏蔽。尝试将屏蔽设置为:ui-mask=“999.999.999-99”
尝试将掩码设置为:ui mask=“999.999.999-99”
我正在使用它。这就是我使用ui屏蔽的原因。这就是为什么我在使用ui屏蔽。你能在fiddle/plunker中发布演示吗?你能在fiddle/plunker中发布演示吗?
$scope.PersonalIdentificationNumber = result.Result.PersonalIdentificationNumber;