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

Function addTextInterpolateDirective

test/angular/1.3/angular.js:8064–8088  ·  view source on GitHub ↗
(directives, text)

Source from the content-addressed store, hash-verified

8062
8063
8064 function addTextInterpolateDirective(directives, text) {
8065 var interpolateFn = $interpolate(text, true);
8066 if (interpolateFn) {
8067 directives.push({
8068 priority: 0,
8069 compile: function textInterpolateCompileFn(templateNode) {
8070 var templateNodeParent = templateNode.parent(),
8071 hasCompileParent = !!templateNodeParent.length;
8072
8073 // When transcluding a template that has bindings in the root
8074 // we don't have a parent and thus need to add the class during linking fn.
8075 if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
8076
8077 return function textInterpolateLinkFn(scope, node) {
8078 var parent = node.parent();
8079 if (!hasCompileParent) compile.$$addBindingClass(parent);
8080 compile.$$addBindingInfo(parent, interpolateFn.expressions);
8081 scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
8082 node[0].nodeValue = value;
8083 });
8084 };
8085 }
8086 });
8087 }
8088 }
8089
8090
8091 function wrapTemplate(type, template) {

Callers 1

collectDirectivesFunction · 0.70

Calls 1

$interpolateFunction · 0.70

Tested by

no test coverage detected