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

Function createBoundTranscludeFn

test/angular/1.5/angular.js:8819–8846  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

8817 }
8818
8819 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
8820 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
8821
8822 if (!transcludedScope) {
8823 transcludedScope = scope.$new(false, containingScope);
8824 transcludedScope.$$transcluded = true;
8825 }
8826
8827 return transcludeFn(transcludedScope, cloneFn, {
8828 parentBoundTranscludeFn: previousBoundTranscludeFn,
8829 transcludeControllers: controllers,
8830 futureParentElement: futureParentElement
8831 });
8832 }
8833
8834 // We need to attach the transclusion slots onto the `boundTranscludeFn`
8835 // so that they are available inside the `controllersBoundTransclude` function
8836 var boundSlots = boundTranscludeFn.$$slots = createMap();
8837 for (var slotName in transcludeFn.$$slots) {
8838 if (transcludeFn.$$slots[slotName]) {
8839 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
8840 } else {
8841 boundSlots[slotName] = null;
8842 }
8843 }
8844
8845 return boundTranscludeFn;
8846 }
8847
8848 /**
8849 * 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