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

Function addTextInterpolateDirective

lib/test/angular/1.5.0/angular.js:9281–9305  ·  view source on GitHub ↗
(directives, text)

Source from the content-addressed store, hash-verified

9279
9280
9281 function addTextInterpolateDirective(directives, text) {
9282 var interpolateFn = $interpolate(text, true);
9283 if (interpolateFn) {
9284 directives.push({
9285 priority: 0,
9286 compile: function textInterpolateCompileFn(templateNode) {
9287 var templateNodeParent = templateNode.parent(),
9288 hasCompileParent = !!templateNodeParent.length;
9289
9290 // When transcluding a template that has bindings in the root
9291 // we don't have a parent and thus need to add the class during linking fn.
9292 if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
9293
9294 return function textInterpolateLinkFn(scope, node) {
9295 var parent = node.parent();
9296 if (!hasCompileParent) compile.$$addBindingClass(parent);
9297 compile.$$addBindingInfo(parent, interpolateFn.expressions);
9298 scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
9299 node[0].nodeValue = value;
9300 });
9301 };
9302 }
9303 });
9304 }
9305 }
9306
9307
9308 function wrapTemplate(type, template) {

Callers 1

collectDirectivesFunction · 0.70

Calls 1

$interpolateFunction · 0.70

Tested by

no test coverage detected