function interpolateText(node, scope, totalChars, originalNodeValues, resetCounter) {
            var i,
                currentNodeContent,
                currentLength,
                interpolatedContent,
                interpolatedLength,
                lengthDelta;

            if (resetCounter) {
                originalNodeValues.counter = 0;
            }

            if (node.nodeValue !== null) {
                currentNodeContent = originalNodeValues.values[originalNodeValues.counter];
                currentLength = currentNodeContent.length;
                interpolatedContent = $interpolate(currentNodeContent)(scope);
                interpolatedLength = interpolatedContent.length;

                lengthDelta = interpolatedLength - currentLength;
                totalChars += lengthDelta;
                originalNodeValues.values[originalNodeValues.counter] = interpolatedContent;

                originalNodeValues.counter ++;
            }

            for (i = 0; i < node.childNodes.length; i++) {
                totalChars = interpolateText(node.childNodes[i], scope, totalChars, originalNodeValues);
            }

            return totalChars;
        }
If any of the text nodes contain interpolation expressions {{ like.this }}, we need to
interpolate them to get the actual value to be displayed. This will change the
totalChars count so that must also be updated.

@param node
@param scope
@param totalChars