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

Function compilationGenerator

test/angular/1.6/angular.js:9553–9569  ·  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

9551 * @returns {Function}
9552 */
9553 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
9554 var compiled;
9555
9556 if (eager) {
9557 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9558 }
9559 return /** @this */ function lazyCompilation() {
9560 if (!compiled) {
9561 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9562
9563 // Null out all of these references in order to make them eligible for garbage collection
9564 // since this is a potentially long lived closure
9565 $compileNodes = transcludeFn = previousCompileContext = null;
9566 }
9567 return compiled.apply(this, arguments);
9568 };
9569 }
9570
9571 /**
9572 * 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