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

Function ngModelOptionsDirective

test/angular/1.5/angular.js:28945–28964  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28943 </example>
28944 */
28945var ngModelOptionsDirective = function() {
28946 return {
28947 restrict: 'A',
28948 controller: ['$scope', '$attrs', function NgModelOptionsController($scope, $attrs) {
28949 var that = this;
28950 this.$options = copy($scope.$eval($attrs.ngModelOptions));
28951 // Allow adding/overriding bound events
28952 if (isDefined(this.$options.updateOn)) {
28953 this.$options.updateOnDefault = false;
28954 // extract "default" pseudo-event from list of events that can trigger a model update
28955 this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
28956 that.$options.updateOnDefault = true;
28957 return ' ';
28958 }));
28959 } else {
28960 this.$options.updateOnDefault = true;
28961 }
28962 }]
28963 };
28964};
28965
28966
28967

Callers

nothing calls this directly

Calls 3

copyFunction · 0.70
isDefinedFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected