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

Function compilationGenerator

lib/test/angular/1.5.0/angular.js:8431–8449  ·  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

8429 * @returns {Function}
8430 */
8431 function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
8432 if (eager) {
8433 return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
8434 }
8435
8436 var compiled;
8437
8438 return function() {
8439 if (!compiled) {
8440 compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
8441
8442 // Null out all of these references in order to make them eligible for garbage collection
8443 // since this is a potentially long lived closure
8444 $compileNodes = transcludeFn = previousCompileContext = null;
8445 }
8446
8447 return compiled.apply(this, arguments);
8448 };
8449 }
8450
8451 /**
8452 * 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