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

Function addTextInterpolateDirective

lib/test/angular/1.7.0/angular.js:10470–10494  ·  view source on GitHub ↗
(directives, text)

Source from the content-addressed store, hash-verified

10468
10469
10470 function addTextInterpolateDirective(directives, text) {
10471 var interpolateFn = $interpolate(text, true);
10472 if (interpolateFn) {
10473 directives.push({
10474 priority: 0,
10475 compile: function textInterpolateCompileFn(templateNode) {
10476 var templateNodeParent = templateNode.parent(),
10477 hasCompileParent = !!templateNodeParent.length;
10478
10479 // When transcluding a template that has bindings in the root
10480 // we don't have a parent and thus need to add the class during linking fn.
10481 if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
10482
10483 return function textInterpolateLinkFn(scope, node) {
10484 var parent = node.parent();
10485 if (!hasCompileParent) compile.$$addBindingClass(parent);
10486 compile.$$addBindingInfo(parent, interpolateFn.expressions);
10487 scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
10488 node[0].nodeValue = value;
10489 });
10490 };
10491 }
10492 });
10493 }
10494 }
10495
10496
10497 function wrapTemplate(type, template) {

Callers 1

collectDirectivesFunction · 0.70

Calls 1

$interpolateFunction · 0.70

Tested by

no test coverage detected