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

Function compilationGenerator

lib/test/angular/1.7.0/angular.js:9592–9608  ·  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

9590 * @returns {Function}
9591 */
9592 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
9593 var compiled;
9594
9595 if (eager) {
9596 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9597 }
9598 return /** @this */ function lazyCompilation() {
9599 if (!compiled) {
9600 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
9601
9602 // Null out all of these references in order to make them eligible for garbage collection
9603 // since this is a potentially long lived closure
9604 $compileNodes = transcludeFn = previousCompileContext = null;
9605 }
9606 return compiled.apply(this, arguments);
9607 };
9608 }
9609
9610 /**
9611 * 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