mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
This commit is contained in:
parent
b6ca7fca96
commit
f736bea8ee
2 changed files with 3 additions and 0 deletions
|
|
@ -227,6 +227,7 @@ export interface Component extends Directive {
|
|||
changeDetection?: ChangeDetectionStrategy;
|
||||
encapsulation?: ViewEncapsulation;
|
||||
imports?: (Type<any> | ReadonlyArray<any>)[];
|
||||
// @deprecated
|
||||
interpolation?: [string, string];
|
||||
// @deprecated
|
||||
moduleId?: string;
|
||||
|
|
|
|||
|
|
@ -625,6 +625,8 @@ export interface Component extends Directive {
|
|||
|
||||
/**
|
||||
* Overrides the default interpolation start and end delimiters (`{{` and `}}`).
|
||||
*
|
||||
* @deprecated use Angular's default interpolation delimiters instead.
|
||||
*/
|
||||
interpolation?: [string, string];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue