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

Function parseIsolateBindings

lib/test/angular/1.5.0/angular.js:7371–7397  ·  view source on GitHub ↗
(scope, directiveName, isController)

Source from the content-addressed store, hash-verified

7369 var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
7370
7371 function parseIsolateBindings(scope, directiveName, isController) {
7372 var LOCAL_REGEXP = /^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/;
7373
7374 var bindings = {};
7375
7376 forEach(scope, function(definition, scopeName) {
7377 var match = definition.match(LOCAL_REGEXP);
7378
7379 if (!match) {
7380 throw $compileMinErr('iscp',
7381 "Invalid {3} for directive '{0}'." +
7382 " Definition: {... {1}: '{2}' ...}",
7383 directiveName, scopeName, definition,
7384 (isController ? "controller bindings definition" :
7385 "isolate scope definition"));
7386 }
7387
7388 bindings[scopeName] = {
7389 mode: match[1][0],
7390 collection: match[2] === '*',
7391 optional: match[3] === '?',
7392 attrName: match[4] || scopeName
7393 };
7394 });
7395
7396 return bindings;
7397 }
7398
7399 function parseDirectiveBindings(directive, directiveName) {
7400 var bindings = {

Callers 1

parseDirectiveBindingsFunction · 0.70

Calls 1

forEachFunction · 0.70

Tested by

no test coverage detected