MCPcopy Create free account
hub / github.com/angular/angular / normalizeExpression

Method normalizeExpression

packages/compiler/src/i18n/i18n_parser.ts:355–363  ·  view source on GitHub ↗
(token: InterpolationToken | AttributeValueInterpolationToken)

Source from the content-addressed store, hash-verified

353 // Normalize expression whitespace by parsing and re-serializing it. This makes
354 // message IDs more durable to insignificant whitespace changes.
355 normalizeExpression(token: InterpolationToken | AttributeValueInterpolationToken): string {
356 const expression = token.parts[1];
357 const expr = this._expressionParser.parseBinding(
358 expression,
359 /* location */ token.sourceSpan,
360 /* absoluteOffset */ token.sourceSpan.start.offset,
361 );
362 return serializeExpression(expr);
363 }
364}
365
366/**

Callers 1

Calls 1

parseBindingMethod · 0.45

Tested by

no test coverage detected