($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate)
| 28773 | */ |
| 28774 | NgModelController.$inject = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$q', '$interpolate']; |
| 28775 | function NgModelController($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $q, $interpolate) { |
| 28776 | this.$viewValue = Number.NaN; |
| 28777 | this.$modelValue = Number.NaN; |
| 28778 | this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity. |
| 28779 | this.$validators = {}; |
| 28780 | this.$asyncValidators = {}; |
| 28781 | this.$parsers = []; |
| 28782 | this.$formatters = []; |
| 28783 | this.$viewChangeListeners = []; |
| 28784 | this.$untouched = true; |
| 28785 | this.$touched = false; |
| 28786 | this.$pristine = true; |
| 28787 | this.$dirty = false; |
| 28788 | this.$valid = true; |
| 28789 | this.$invalid = false; |
| 28790 | this.$error = {}; // keep invalid keys here |
| 28791 | this.$$success = {}; // keep valid keys here |
| 28792 | this.$pending = undefined; // keep pending keys here |
| 28793 | this.$name = $interpolate($attr.name || '', false)($scope); |
| 28794 | this.$$parentForm = nullFormCtrl; |
| 28795 | this.$options = defaultModelOptions; |
| 28796 | |
| 28797 | this.$$parsedNgModel = $parse($attr.ngModel); |
| 28798 | this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; |
| 28799 | this.$$ngModelGet = this.$$parsedNgModel; |
| 28800 | this.$$ngModelSet = this.$$parsedNgModelAssign; |
| 28801 | this.$$pendingDebounce = null; |
| 28802 | this.$$parserValid = undefined; |
| 28803 | |
| 28804 | this.$$currentValidationRunId = 0; |
| 28805 | |
| 28806 | // https://github.com/angular/angular.js/issues/15833 |
| 28807 | // Prevent `$$scope` from being iterated over by `copy` when NgModelController is deep watched |
| 28808 | Object.defineProperty(this, '$$scope', {value: $scope}); |
| 28809 | this.$$attr = $attr; |
| 28810 | this.$$element = $element; |
| 28811 | this.$$animate = $animate; |
| 28812 | this.$$timeout = $timeout; |
| 28813 | this.$$parse = $parse; |
| 28814 | this.$$q = $q; |
| 28815 | this.$$exceptionHandler = $exceptionHandler; |
| 28816 | |
| 28817 | setupValidity(this); |
| 28818 | setupModelWatcher(this); |
| 28819 | } |
| 28820 | |
| 28821 | NgModelController.prototype = { |
| 28822 | $$initGetterSetters: function() { |
nothing calls this directly
no test coverage detected