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

Function createBoundTranscludeFn

lib/test/angular/1.7.0/angular.js:9385–9412  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

9383 }
9384
9385 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
9386 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
9387
9388 if (!transcludedScope) {
9389 transcludedScope = scope.$new(false, containingScope);
9390 transcludedScope.$$transcluded = true;
9391 }
9392
9393 return transcludeFn(transcludedScope, cloneFn, {
9394 parentBoundTranscludeFn: previousBoundTranscludeFn,
9395 transcludeControllers: controllers,
9396 futureParentElement: futureParentElement
9397 });
9398 }
9399
9400 // We need to attach the transclusion slots onto the `boundTranscludeFn`
9401 // so that they are available inside the `controllersBoundTransclude` function
9402 var boundSlots = boundTranscludeFn.$$slots = createMap();
9403 for (var slotName in transcludeFn.$$slots) {
9404 if (transcludeFn.$$slots[slotName]) {
9405 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
9406 } else {
9407 boundSlots[slotName] = null;
9408 }
9409 }
9410
9411 return boundTranscludeFn;
9412 }
9413
9414 /**
9415 * Looks for directives on the given node and adds them to the directive collection which is

Callers 2

compositeLinkFnFunction · 0.70
compileTemplateUrlFunction · 0.70

Calls 1

createMapFunction · 0.70

Tested by

no test coverage detected