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

Function createBoundTranscludeFn

lib/test/angular/1.5.0/angular.js:8235–8263  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

8233 }
8234
8235 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
8236
8237 var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
8238
8239 if (!transcludedScope) {
8240 transcludedScope = scope.$new(false, containingScope);
8241 transcludedScope.$$transcluded = true;
8242 }
8243
8244 return transcludeFn(transcludedScope, cloneFn, {
8245 parentBoundTranscludeFn: previousBoundTranscludeFn,
8246 transcludeControllers: controllers,
8247 futureParentElement: futureParentElement
8248 });
8249 };
8250
8251 // We need to attach the transclusion slots onto the `boundTranscludeFn`
8252 // so that they are available inside the `controllersBoundTransclude` function
8253 var boundSlots = boundTranscludeFn.$$slots = createMap();
8254 for (var slotName in transcludeFn.$$slots) {
8255 if (transcludeFn.$$slots[slotName]) {
8256 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
8257 } else {
8258 boundSlots[slotName] = null;
8259 }
8260 }
8261
8262 return boundTranscludeFn;
8263 }
8264
8265 /**
8266 * 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