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

Function compilationGenerator

lib/test/angular/1.8.0/angular.js:10165–10181  ·  view source on GitHub ↗

* A function generator that is used to support both eager and lazy compilation * linking function. * @param eager * @param $compileNodes * @param transcludeFn * @param maxPriority * @param ignoreDirective * @param previousCompileContext * @returns {Function}

(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext)

Source from the content-addressed store, hash-verified

10163 * @returns {Function}
10164 */
10165 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
10166 var compiled;
10167
10168 if (eager) {
10169 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
10170 }
10171 return /** @this */ function lazyCompilation() {
10172 if (!compiled) {
10173 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
10174
10175 // Null out all of these references in order to make them eligible for garbage collection
10176 // since this is a potentially long lived closure
10177 $compileNodes = transcludeFn = previousCompileContext = null;
10178 }
10179 return compiled.apply(this, arguments);
10180 };
10181 }
10182
10183 /**
10184 * Once the directives have been collected, their compile functions are executed. This method

Callers 1

applyDirectivesToNodeFunction · 0.70

Calls 1

compileFunction · 0.70

Tested by

no test coverage detected