Skip to content

Commit 4bcf1b1

Browse files
committed
perf($interpolate): move $sce/stringify from a parse interceptor to the watcher
1 parent 77d8ae1 commit 4bcf1b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ng/interpolate.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ function $InterpolateProvider() {
202202
}
203203
exp = text.substring(startIndex + startSymbolLength, endIndex);
204204
expressions.push(exp);
205-
parseFns.push($parse(exp, parseStringifyInterceptor));
205+
parseFns.push($parse(exp));
206206
index = endIndex + endSymbolLength;
207207
expressionPositions.push(concat.length);
208208
concat.push('');
@@ -232,7 +232,7 @@ function $InterpolateProvider() {
232232
var compute = function(values) {
233233
for (var i = 0, ii = expressions.length; i < ii; i++) {
234234
if (allOrNothing && isUndefined(values[i])) return;
235-
concat[expressionPositions[i]] = values[i];
235+
concat[expressionPositions[i]] = parseStringifyValue(values[i]);
236236
}
237237
return concat.join('');
238238
};
@@ -299,7 +299,7 @@ function $InterpolateProvider() {
299299
replace(escapedEndRegexp, endSymbol);
300300
}
301301

302-
function parseStringifyInterceptor(value) {
302+
function parseStringifyValue(value) {
303303
try {
304304
return stringify(getValue(value));
305305
} catch (err) {

0 commit comments

Comments
 (0)