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

Function ngModelOptionsDirective

lib/test/angular/1.4.3/angular.js:25560–25579  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25558 </example>
25559 */
25560var ngModelOptionsDirective = function() {
25561 return {
25562 restrict: 'A',
25563 controller: ['$scope', '$attrs', function($scope, $attrs) {
25564 var that = this;
25565 this.$options = copy($scope.$eval($attrs.ngModelOptions));
25566 // Allow adding/overriding bound events
25567 if (this.$options.updateOn !== undefined) {
25568 this.$options.updateOnDefault = false;
25569 // extract "default" pseudo-event from list of events that can trigger a model update
25570 this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
25571 that.$options.updateOnDefault = true;
25572 return ' ';
25573 }));
25574 } else {
25575 this.$options.updateOnDefault = true;
25576 }
25577 }]
25578 };
25579};
25580
25581
25582

Callers

nothing calls this directly

Calls 2

copyFunction · 0.70
trimFunction · 0.70

Tested by

no test coverage detected