MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / ngModelOptionsDirective

Function ngModelOptionsDirective

lib/test/angular/1.5.0/angular.js:26889–26908  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26887 </example>
26888 */
26889var ngModelOptionsDirective = function() {
26890 return {
26891 restrict: 'A',
26892 controller: ['$scope', '$attrs', function($scope, $attrs) {
26893 var that = this;
26894 this.$options = copy($scope.$eval($attrs.ngModelOptions));
26895 // Allow adding/overriding bound events
26896 if (isDefined(this.$options.updateOn)) {
26897 this.$options.updateOnDefault = false;
26898 // extract "default" pseudo-event from list of events that can trigger a model update
26899 this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
26900 that.$options.updateOnDefault = true;
26901 return ' ';
26902 }));
26903 } else {
26904 this.$options.updateOnDefault = true;
26905 }
26906 }]
26907 };
26908};
26909
26910
26911

Callers

nothing calls this directly

Calls 3

copyFunction · 0.70
isDefinedFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected