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

Function parseDirectiveBindings

lib/test/angular/1.6.7/angular.js:8166–8192  ·  view source on GitHub ↗
(directive, directiveName)

Source from the content-addressed store, hash-verified

8164 }
8165
8166 function parseDirectiveBindings(directive, directiveName) {
8167 var bindings = {
8168 isolateScope: null,
8169 bindToController: null
8170 };
8171 if (isObject(directive.scope)) {
8172 if (directive.bindToController === true) {
8173 bindings.bindToController = parseIsolateBindings(directive.scope,
8174 directiveName, true);
8175 bindings.isolateScope = {};
8176 } else {
8177 bindings.isolateScope = parseIsolateBindings(directive.scope,
8178 directiveName, false);
8179 }
8180 }
8181 if (isObject(directive.bindToController)) {
8182 bindings.bindToController =
8183 parseIsolateBindings(directive.bindToController, directiveName, true);
8184 }
8185 if (bindings.bindToController && !directive.controller) {
8186 // There is no controller
8187 throw $compileMinErr('noctrl',
8188 'Cannot bind to controller without directive \'{0}\'s controller.',
8189 directiveName);
8190 }
8191 return bindings;
8192 }
8193
8194 function assertValidDirectiveName(name) {
8195 var letter = name.charAt(0);

Callers 1

addDirectiveFunction · 0.70

Calls 2

isObjectFunction · 0.70
parseIsolateBindingsFunction · 0.70

Tested by

no test coverage detected