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

Function compilationGenerator

test/angular/1.5/angular.js:9033–9049  ·  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

9031 * @returns {Function}
9032 */
9033 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
9034 var compiled;
9035
9036 if (eager) {
9037 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9038 }
9039 return /** @this */ function lazyCompilation() {
9040 if (!compiled) {
9041 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9042
9043 // Null out all of these references in order to make them eligible for garbage collection
9044 // since this is a potentially long lived closure
9045 $compileNodes = transcludeFn = previousCompileContext = null;
9046 }
9047 return compiled.apply(this, arguments);
9048 };
9049 }
9050
9051 /**
9052 * 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