MCPcopy
hub / github.com/angular-ui/ui-grid / createBoundTranscludeFn

Function createBoundTranscludeFn

lib/test/angular/1.6.7/angular.js:9275–9302  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

9273 }
9274
9275 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
9276 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
9277
9278 if (!transcludedScope) {
9279 transcludedScope = scope.$new(false, containingScope);
9280 transcludedScope.$$transcluded = true;
9281 }
9282
9283 return transcludeFn(transcludedScope, cloneFn, {
9284 parentBoundTranscludeFn: previousBoundTranscludeFn,
9285 transcludeControllers: controllers,
9286 futureParentElement: futureParentElement
9287 });
9288 }
9289
9290 // We need to attach the transclusion slots onto the `boundTranscludeFn`
9291 // so that they are available inside the `controllersBoundTransclude` function
9292 var boundSlots = boundTranscludeFn.$$slots = createMap();
9293 for (var slotName in transcludeFn.$$slots) {
9294 if (transcludeFn.$$slots[slotName]) {
9295 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
9296 } else {
9297 boundSlots[slotName] = null;
9298 }
9299 }
9300
9301 return boundTranscludeFn;
9302 }
9303
9304 /**
9305 * 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