Skip to content

Commit f736bea

Browse files
alxhubatscott
authored andcommitted
refactor(core): deprecate @Component.interpolation (#55778)
Angular has long had the ability to use different interpolation delimiters (by default `{{` and `}}`). This concept was copied over from AngularJS, where AngularJS syntax is included in HTML sent over the network to the browser. Occasionally developers would use SSR frameworks which _also_ have interpolation syntaxes of their own, so there was a need to change the delimiters used by AngularJS to avoid conflicts. Since Angular templates are always processed by our compiler and the interpolation characters are never processed by other systems first, this option is vestigial in Angular and only increases the complexity of our parser. DEPRECATED: `@Component.interpolation` is deprecated. Use Angular's delimiters instead. PR Close #55778
1 parent b6ca7fc commit f736bea

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

goldens/public-api/core/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ export interface Component extends Directive {
227227
changeDetection?: ChangeDetectionStrategy;
228228
encapsulation?: ViewEncapsulation;
229229
imports?: (Type<any> | ReadonlyArray<any>)[];
230+
// @deprecated
230231
interpolation?: [string, string];
231232
// @deprecated
232233
moduleId?: string;

packages/core/src/metadata/directives.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,8 @@ export interface Component extends Directive {
625625

626626
/**
627627
* Overrides the default interpolation start and end delimiters (`{{` and `}}`).
628+
*
629+
* @deprecated use Angular's default interpolation delimiters instead.
628630
*/
629631
interpolation?: [string, string];
630632

0 commit comments

Comments
 (0)