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

Function compilationGenerator

lib/test/angular/1.6.7/angular.js:9482–9498  ·  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

9480 * @returns {Function}
9481 */
9482 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
9483 var compiled;
9484
9485 if (eager) {
9486 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9487 }
9488 return /** @this */ function lazyCompilation() {
9489 if (!compiled) {
9490 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9491
9492 // Null out all of these references in order to make them eligible for garbage collection
9493 // since this is a potentially long lived closure
9494 $compileNodes = transcludeFn = previousCompileContext = null;
9495 }
9496 return compiled.apply(this, arguments);
9497 };
9498 }
9499
9500 /**
9501 * 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