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

Function addTextInterpolateDirective

lib/test/angular/1.4.3/angular.js:8431–8455  ·  view source on GitHub ↗
(directives, text)

Source from the content-addressed store, hash-verified

8429
8430
8431 function addTextInterpolateDirective(directives, text) {
8432 var interpolateFn = $interpolate(text, true);
8433 if (interpolateFn) {
8434 directives.push({
8435 priority: 0,
8436 compile: function textInterpolateCompileFn(templateNode) {
8437 var templateNodeParent = templateNode.parent(),
8438 hasCompileParent = !!templateNodeParent.length;
8439
8440 // When transcluding a template that has bindings in the root
8441 // we don't have a parent and thus need to add the class during linking fn.
8442 if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
8443
8444 return function textInterpolateLinkFn(scope, node) {
8445 var parent = node.parent();
8446 if (!hasCompileParent) compile.$$addBindingClass(parent);
8447 compile.$$addBindingInfo(parent, interpolateFn.expressions);
8448 scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
8449 node[0].nodeValue = value;
8450 });
8451 };
8452 }
8453 });
8454 }
8455 }
8456
8457
8458 function wrapTemplate(type, template) {

Callers 1

collectDirectivesFunction · 0.70

Calls 1

$interpolateFunction · 0.70

Tested by

no test coverage detected