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

Function addTextInterpolateDirective

test/angular/1.5/angular.js:9936–9960  ·  view source on GitHub ↗
(directives, text)

Source from the content-addressed store, hash-verified

9934
9935
9936 function addTextInterpolateDirective(directives, text) {
9937 var interpolateFn = $interpolate(text, true);
9938 if (interpolateFn) {
9939 directives.push({
9940 priority: 0,
9941 compile: function textInterpolateCompileFn(templateNode) {
9942 var templateNodeParent = templateNode.parent(),
9943 hasCompileParent = !!templateNodeParent.length;
9944
9945 // When transcluding a template that has bindings in the root
9946 // we don't have a parent and thus need to add the class during linking fn.
9947 if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
9948
9949 return function textInterpolateLinkFn(scope, node) {
9950 var parent = node.parent();
9951 if (!hasCompileParent) compile.$$addBindingClass(parent);
9952 compile.$$addBindingInfo(parent, interpolateFn.expressions);
9953 scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
9954 node[0].nodeValue = value;
9955 });
9956 };
9957 }
9958 });
9959 }
9960 }
9961
9962
9963 function wrapTemplate(type, template) {

Callers 1

collectDirectivesFunction · 0.70

Calls 1

$interpolateFunction · 0.70

Tested by

no test coverage detected