MCPcopy Create free account
hub / github.com/bclinkinbeard/angular / createBoundTranscludeFn

Function createBoundTranscludeFn

test/fixtures/foo.js:6107–6126  ·  view source on GitHub ↗
(scope, transcludeFn, previousBoundTranscludeFn)

Source from the content-addressed store, hash-verified

6105 }
6106
6107 function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
6108
6109 var boundTranscludeFn = function(transcludedScope, cloneFn, controllers) {
6110 var scopeCreated = false;
6111
6112 if (!transcludedScope) {
6113 transcludedScope = scope.$new();
6114 transcludedScope.$$transcluded = true;
6115 scopeCreated = true;
6116 }
6117
6118 var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn);
6119 if (scopeCreated) {
6120 clone.on('$destroy', function() { transcludedScope.$destroy(); });
6121 }
6122 return clone;
6123 };
6124
6125 return boundTranscludeFn;
6126 }
6127
6128 /**
6129 * Looks for directives on the given node and adds them to the directive collection which is

Callers 2

compositeLinkFnFunction · 0.85
compileTemplateUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected