MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / controllersBoundTransclude

Function controllersBoundTransclude

lib/test/angular/1.5.0/angular.js:8989–9022  ·  view source on GitHub ↗
(scope, cloneAttachFn, futureParentElement, slotName)

Source from the content-addressed store, hash-verified

8987 // This is the function that is injected as `$transclude`.
8988 // Note: all arguments are optional!
8989 function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {
8990 var transcludeControllers;
8991 // No scope passed in:
8992 if (!isScope(scope)) {
8993 slotName = futureParentElement;
8994 futureParentElement = cloneAttachFn;
8995 cloneAttachFn = scope;
8996 scope = undefined;
8997 }
8998
8999 if (hasElementTranscludeDirective) {
9000 transcludeControllers = elementControllers;
9001 }
9002 if (!futureParentElement) {
9003 futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
9004 }
9005 if (slotName) {
9006 // slotTranscludeFn can be one of three things:
9007 // * a transclude function - a filled slot
9008 // * `null` - an optional slot that was not filled
9009 // * `undefined` - a slot that was not declared (i.e. invalid)
9010 var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];
9011 if (slotTranscludeFn) {
9012 return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
9013 } else if (isUndefined(slotTranscludeFn)) {
9014 throw $compileMinErr('noslot',
9015 'No parent directive that requires a transclusion with slot name "{0}". ' +
9016 'Element: {1}',
9017 slotName, startingTag($element));
9018 }
9019 } else {
9020 return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
9021 }
9022 }
9023 }
9024 }
9025

Callers

nothing calls this directly

Calls 4

isScopeFunction · 0.70
isUndefinedFunction · 0.70
startingTagFunction · 0.70
boundTranscludeFnFunction · 0.70

Tested by

no test coverage detected