ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat: implement ng-model-options to allowInvalid

Open eislasq opened this issue 11 years ago • 3 comments

Type: feat

Platform: all

Writing a filter that capitalice inputs, it doesn't work when it has validations, because when validation fails the model value becomes undefined.

Please do something like this https://github.com/angular/angular.js/commit/b2e146370f9c5d182f2500e637ba46edebeeb1cd

eislasq avatar Mar 10 '15 20:03 eislasq

Hi. I have found an alternative solution, and easy using "unshift" instead "push" in the line modelCtrl.$parsers.unshift(capitalize); of my .directive('capitalize',... With this my directive will be executed before other directives like validations.

eislasq avatar Mar 10 '15 22:03 eislasq

I don't understand what you want here. Why don't you just use ng-model-options as normal?

ajoslin avatar Mar 11 '15 18:03 ajoslin

I am trying to set allowInvalid to true whith ng-model-options but it doesnt work in ionic.

But dont worry, As I said above I have found other solution for my feature.

eislasq avatar Mar 11 '15 18:03 eislasq