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

Function ngModelOptionsDirective

test/angular/1.4/angular.js:26427–26446  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26425 </example>
26426 */
26427var ngModelOptionsDirective = function() {
26428 return {
26429 restrict: 'A',
26430 controller: ['$scope', '$attrs', function($scope, $attrs) {
26431 var that = this;
26432 this.$options = copy($scope.$eval($attrs.ngModelOptions));
26433 // Allow adding/overriding bound events
26434 if (isDefined(this.$options.updateOn)) {
26435 this.$options.updateOnDefault = false;
26436 // extract "default" pseudo-event from list of events that can trigger a model update
26437 this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
26438 that.$options.updateOnDefault = true;
26439 return ' ';
26440 }));
26441 } else {
26442 this.$options.updateOnDefault = true;
26443 }
26444 }]
26445 };
26446};
26447
26448
26449

Callers

nothing calls this directly

Calls 3

copyFunction · 0.70
isDefinedFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected