how to trigger angular parsers without inputing anything in the field

后端 未结 2 1060
借酒劲吻你
借酒劲吻你 2021-01-05 20:07

As the subject states, how do I trigger the actions to take place inside a

modelController.$parsers(...) 

without user input... the only wa

2条回答
  •  星月不相逢
    2021-01-05 20:36

    This question is actual for me also... Because i am resolving this issue with:

    var triggerParsers = function() {
        var val = ngModel.$viewValue; 
        ngModel.$setViewValue(null);
        ngModel.$setViewValue(val);
    };
    

提交回复
热议问题