How to access the $ngModelController from inside the Controller without a Form and without a Directive

前端 未结 1 1682
有刺的猬
有刺的猬 2020-12-20 15:38

Maybe it\'s a rookie mistake, but I can\'t seem to access the $scope.model\'s $ngModelController so I can grab the $viewValue from it.

相关标签:
1条回答
  • 2020-12-20 16:36

    I like the directive alternative. Essentially the ui-mask directive isn't doing what you want, so you might as well write your own directive.

    You shouldn't have to pass inicio to your view-value directive. Instead, add your own parser to ngModelCtrl.$parsers. Here's an example: https://stackoverflow.com/a/15556249/215945

    0 讨论(0)
提交回复
热议问题