($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate)
| 30283 | */ |
| 30284 | NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; |
| 30285 | function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { |
| 30286 | this.$viewValue = Number.NaN; |
| 30287 | this.$modelValue = Number.NaN; |
| 30288 | this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. |
| 30289 | this.$validators = {}; |
| 30290 | this.$asyncValidators = {}; |
| 30291 | this.$parsers = []; |
| 30292 | this.$formatters = []; |
| 30293 | this.$viewChangeListeners = []; |
| 30294 | this.$untouched = true; |
| 30295 | this.$touched = false; |
| 30296 | this.$pristine = true; |
| 30297 | this.$dirty = false; |
| 30298 | this.$valid = true; |
| 30299 | this.$invalid = false; |
| 30300 | this.$error = {}; // keep invalid keys here |
| 30301 | this.$$success = {}; // keep valid keys here |
| 30302 | this.$pending = undefined; // keep pending keys here |
| 30303 | this.$name = $interpolate($attr.name || '', false)($scope); |
| 30304 | this.$$parentForm = nullFormCtrl; |
| 30305 | this.$options = defaultModelOptions; |
| 30306 | this.$$updateEvents = ''; |
| 30307 | // Attach the correct context to the event handler function for updateOn |
| 30308 | this.$$updateEventHandler = this.$$updateEventHandler.bind(this); |
| 30309 | |
| 30310 | this.$$parsedNgModel = $parse($attr.ngModel); |
| 30311 | this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; |
| 30312 | this.$$ngModelGet = this.$$parsedNgModel; |
| 30313 | this.$$ngModelSet = this.$$parsedNgModelAssign; |
| 30314 | this.$$pendingDebounce = null; |
| 30315 | this.$$parserValid = undefined; |
| 30316 | this.$$parserName = 'parse'; |
| 30317 | |
| 30318 | this.$$currentValidationRunId = 0; |
| 30319 | |
| 30320 | this.$$scope = $scope; |
| 30321 | this.$$rootScope = $scope.$root; |
| 30322 | this.$$attr = $attr; |
| 30323 | this.$$element = $element; |
| 30324 | this.$$animate = $animate; |
| 30325 | this.$$timeout = $timeout; |
| 30326 | this.$$parse = $parse; |
| 30327 | this.$$q = $q; |
| 30328 | this.$$exceptionHandler = $exceptionHandler; |
| 30329 | |
| 30330 | setupValidity(this); |
| 30331 | setupModelWatcher(this); |
| 30332 | } |
| 30333 | |
| 30334 | NgModelController.prototype = { |
| 30335 | $$initGetterSetters: function() { |
nothing calls this directly
no test coverage detected