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

Function createBoundTranscludeFn

lib/test/angular/1.8.0/angular.js:9935–9962  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

9933 }
9934
9935 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
9936 function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
9937
9938 if (!transcludedScope) {
9939 transcludedScope = scope.$new(false, containingScope);
9940 transcludedScope.$$transcluded = true;
9941 }
9942
9943 return transcludeFn(transcludedScope, cloneFn, {
9944 parentBoundTranscludeFn: previousBoundTranscludeFn,
9945 transcludeControllers: controllers,
9946 futureParentElement: futureParentElement
9947 });
9948 }
9949
9950 // We need to attach the transclusion slots onto the `boundTranscludeFn`
9951 // so that they are available inside the `controllersBoundTransclude` function
9952 var boundSlots = boundTranscludeFn.$$slots = createMap();
9953 for (var slotName in transcludeFn.$$slots) {
9954 if (transcludeFn.$$slots[slotName]) {
9955 boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
9956 } else {
9957 boundSlots[slotName] = null;
9958 }
9959 }
9960
9961 return boundTranscludeFn;
9962 }
9963
9964 /**
9965 * 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