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

Function createBoundTranscludeFn

test/angular/1.6/angular.js:9346–9373  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

9344 }
9345
9346 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
9347 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
9348
9349 if (!transcludedScope) {
9350 transcludedScope = scope.$new(false, containingScope);
9351 transcludedScope.$$transcluded = true;
9352 }
9353
9354 return transcludeFn(transcludedScope, cloneFn, {
9355 parentBoundTranscludeFn: previousBoundTranscludeFn,
9356 transcludeControllers: controllers,
9357 futureParentElement: futureParentElement
9358 });
9359 }
9360
9361 // We need to attach the transclusion slots onto the `boundTranscludeFn`
9362 // so that they are available inside the `controllersBoundTransclude` function
9363 var boundSlots = boundTranscludeFn.$$slots = createMap();
9364 for (var slotName in transcludeFn.$$slots) {
9365 if (transcludeFn.$$slots[slotName]) {
9366 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
9367 } else {
9368 boundSlots[slotName] = null;
9369 }
9370 }
9371
9372 return boundTranscludeFn;
9373 }
9374
9375 /**
9376 * 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