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

Function controllersBoundTransclude

lib/test/angular/1.7.0/angular.js:10096–10129  ·  view source on GitHub ↗
(scope, cloneAttachFn, futureParentElement, slotName)

Source from the content-addressed store, hash-verified

10094 // This is the function that is injected as `$transclude`.
10095 // Note: all arguments are optional!
10096 function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {
10097 var transcludeControllers;
10098 // No scope passed in:
10099 if (!isScope(scope)) {
10100 slotName = futureParentElement;
10101 futureParentElement = cloneAttachFn;
10102 cloneAttachFn = scope;
10103 scope = undefined;
10104 }
10105
10106 if (hasElementTranscludeDirective) {
10107 transcludeControllers = elementControllers;
10108 }
10109 if (!futureParentElement) {
10110 futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
10111 }
10112 if (slotName) {
10113 // slotTranscludeFn can be one of three things:
10114 // * a transclude function - a filled slot
10115 // * `null` - an optional slot that was not filled
10116 // * `undefined` - a slot that was not declared (i.e. invalid)
10117 var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];
10118 if (slotTranscludeFn) {
10119 return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
10120 } else if (isUndefined(slotTranscludeFn)) {
10121 throw $compileMinErr('noslot',
10122 'No parent directive that requires a transclusion with slot name "{0}". ' +
10123 'Element: {1}',
10124 slotName, startingTag($element));
10125 }
10126 } else {
10127 return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
10128 }
10129 }
10130 }
10131 }
10132

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