($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate)
| 29388 | */ |
| 29389 | NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; |
| 29390 | function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { |
| 29391 | this.$viewValue = Number.NaN; |
| 29392 | this.$modelValue = Number.NaN; |
| 29393 | this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. |
| 29394 | this.$validators = {}; |
| 29395 | this.$asyncValidators = {}; |
| 29396 | this.$parsers = []; |
| 29397 | this.$formatters = []; |
| 29398 | this.$viewChangeListeners = []; |
| 29399 | this.$untouched = true; |
| 29400 | this.$touched = false; |
| 29401 | this.$pristine = true; |
| 29402 | this.$dirty = false; |
| 29403 | this.$valid = true; |
| 29404 | this.$invalid = false; |
| 29405 | this.$error = {}; // keep invalid keys here |
| 29406 | this.$$success = {}; // keep valid keys here |
| 29407 | this.$pending = undefined; // keep pending keys here |
| 29408 | this.$name = $interpolate($attr.name || '', false)($scope); |
| 29409 | this.$$parentForm = nullFormCtrl; |
| 29410 | this.$options = defaultModelOptions; |
| 29411 | this.$$updateEvents = ''; |
| 29412 | // Attach the correct context to the event handler function for updateOn |
| 29413 | this.$$updateEventHandler = this.$$updateEventHandler.bind(this); |
| 29414 | |
| 29415 | this.$$parsedNgModel = $parse($attr.ngModel); |
| 29416 | this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; |
| 29417 | this.$$ngModelGet = this.$$parsedNgModel; |
| 29418 | this.$$ngModelSet = this.$$parsedNgModelAssign; |
| 29419 | this.$$pendingDebounce = null; |
| 29420 | this.$$parserValid = undefined; |
| 29421 | this.$$parserName = 'parse'; |
| 29422 | |
| 29423 | this.$$currentValidationRunId = 0; |
| 29424 | |
| 29425 | this.$$scope = $scope; |
| 29426 | this.$$attr = $attr; |
| 29427 | this.$$element = $element; |
| 29428 | this.$$animate = $animate; |
| 29429 | this.$$timeout = $timeout; |
| 29430 | this.$$parse = $parse; |
| 29431 | this.$$q = $q; |
| 29432 | this.$$exceptionHandler = $exceptionHandler; |
| 29433 | |
| 29434 | setupValidity(this); |
| 29435 | setupModelWatcher(this); |
| 29436 | } |
| 29437 | |
| 29438 | NgModelController.prototype = { |
| 29439 | $$initGetterSetters: function() { |
nothing calls this directly
no test coverage detected