MCPcopy
hub / github.com/angular-ui/ui-router / ngModelOptionsDirective

Function ngModelOptionsDirective

test/angular/1.3/angular.js:23946–23965  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23944 </example>
23945 */
23946var ngModelOptionsDirective = function() {
23947 return {
23948 restrict: 'A',
23949 controller: ['$scope', '$attrs', function($scope, $attrs) {
23950 var that = this;
23951 this.$options = $scope.$eval($attrs.ngModelOptions);
23952 // Allow adding/overriding bound events
23953 if (this.$options.updateOn !== undefined) {
23954 this.$options.updateOnDefault = false;
23955 // extract "default" pseudo-event from list of events that can trigger a model update
23956 this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
23957 that.$options.updateOnDefault = true;
23958 return ' ';
23959 }));
23960 } else {
23961 this.$options.updateOnDefault = true;
23962 }
23963 }]
23964 };
23965};
23966
23967
23968

Callers

nothing calls this directly

Calls 1

trimFunction · 0.70

Tested by

no test coverage detected