($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate)
| 30348 | */ |
| 30349 | NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; |
| 30350 | function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { |
| 30351 | this.$viewValue = Number.NaN; |
| 30352 | this.$modelValue = Number.NaN; |
| 30353 | this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. |
| 30354 | this.$validators = {}; |
| 30355 | this.$asyncValidators = {}; |
| 30356 | this.$parsers = []; |
| 30357 | this.$formatters = []; |
| 30358 | this.$viewChangeListeners = []; |
| 30359 | this.$untouched = true; |
| 30360 | this.$touched = false; |
| 30361 | this.$pristine = true; |
| 30362 | this.$dirty = false; |
| 30363 | this.$valid = true; |
| 30364 | this.$invalid = false; |
| 30365 | this.$error = {}; // keep invalid keys here |
| 30366 | this.$$success = {}; // keep valid keys here |
| 30367 | this.$pending = undefined; // keep pending keys here |
| 30368 | this.$name = $interpolate($attr.name || '', false)($scope); |
| 30369 | this.$$parentForm = nullFormCtrl; |
| 30370 | this.$options = defaultModelOptions; |
| 30371 | this.$$updateEvents = ''; |
| 30372 | // Attach the correct context to the event handler function for updateOn |
| 30373 | this.$$updateEventHandler = this.$$updateEventHandler.bind(this); |
| 30374 | |
| 30375 | this.$$parsedNgModel = $parse($attr.ngModel); |
| 30376 | this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; |
| 30377 | this.$$ngModelGet = this.$$parsedNgModel; |
| 30378 | this.$$ngModelSet = this.$$parsedNgModelAssign; |
| 30379 | this.$$pendingDebounce = null; |
| 30380 | this.$$parserValid = undefined; |
| 30381 | this.$$parserName = 'parse'; |
| 30382 | |
| 30383 | this.$$currentValidationRunId = 0; |
| 30384 | |
| 30385 | this.$$scope = $scope; |
| 30386 | this.$$rootScope = $scope.$root; |
| 30387 | this.$$attr = $attr; |
| 30388 | this.$$element = $element; |
| 30389 | this.$$animate = $animate; |
| 30390 | this.$$timeout = $timeout; |
| 30391 | this.$$parse = $parse; |
| 30392 | this.$$q = $q; |
| 30393 | this.$$exceptionHandler = $exceptionHandler; |
| 30394 | |
| 30395 | setupValidity(this); |
| 30396 | setupModelWatcher(this); |
| 30397 | } |
| 30398 | |
| 30399 | NgModelController.prototype = { |
| 30400 | $$initGetterSetters: function() { |
nothing calls this directly
no test coverage detected