Skip to content

Commit af4c4c8

Browse files
committed
refactor(core): remove deprecated interpolation option on Components.
This option was deprecated by #55778. BREAKING CHANGE: The `interpolation` option on Components has been removed. Only the default `{{ ... }}` is now supported.
1 parent 1a26fd3 commit af4c4c8

File tree

19 files changed

+38
-590
lines changed

19 files changed

+38
-590
lines changed

goldens/public-api/core/index.api.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,6 @@ export interface Component extends Directive {
275275
encapsulation?: ViewEncapsulation;
276276
imports?: (Type<any> | ReadonlyArray<any>)[];
277277
// @deprecated
278-
interpolation?: [string, string];
279-
// @deprecated
280278
moduleId?: string;
281279
preserveWhitespaces?: boolean;
282280
schemas?: SchemaMetadata[];

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/GOLDEN_PARTIAL.js

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -566,73 +566,6 @@ export declare class MyModule {
566566
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
567567
}
568568

569-
/****************************************************************************************************
570-
* PARTIAL FILE: interpolation_custom_config.js
571-
****************************************************************************************************/
572-
import { Component, NgModule, Pipe } from '@angular/core';
573-
import * as i0 from "@angular/core";
574-
export class UppercasePipe {
575-
transform(v) { }
576-
}
577-
UppercasePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: UppercasePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
578-
UppercasePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: UppercasePipe, isStandalone: false, name: "uppercase" });
579-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: UppercasePipe, decorators: [{
580-
type: Pipe,
581-
args: [{
582-
name: 'uppercase',
583-
standalone: false
584-
}]
585-
}] });
586-
export class MyComponent {
587-
constructor() {
588-
this.valueA = '';
589-
}
590-
}
591-
MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
592-
MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: `
593-
<div i18n-title="m|d" title="intro {% valueA | uppercase %}"></div>
594-
`, isInline: true, dependencies: [{ kind: "pipe", type: UppercasePipe, name: "uppercase" }], interpolation: ["{%", "%}"] });
595-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{
596-
type: Component,
597-
args: [{
598-
selector: 'my-component',
599-
template: `
600-
<div i18n-title="m|d" title="intro {% valueA | uppercase %}"></div>
601-
`,
602-
interpolation: ['{%', '%}'],
603-
standalone: false
604-
}]
605-
}] });
606-
export class MyModule {
607-
}
608-
MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
609-
MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [UppercasePipe, MyComponent] });
610-
MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule });
611-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{
612-
type: NgModule,
613-
args: [{ declarations: [UppercasePipe, MyComponent] }]
614-
}] });
615-
616-
/****************************************************************************************************
617-
* PARTIAL FILE: interpolation_custom_config.d.ts
618-
****************************************************************************************************/
619-
import * as i0 from "@angular/core";
620-
export declare class UppercasePipe {
621-
transform(v: any): void;
622-
static ɵfac: i0.ɵɵFactoryDeclaration<UppercasePipe, never>;
623-
static ɵpipe: i0.ɵɵPipeDeclaration<UppercasePipe, "uppercase", false>;
624-
}
625-
export declare class MyComponent {
626-
valueA: string;
627-
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
628-
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
629-
}
630-
export declare class MyModule {
631-
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
632-
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof UppercasePipe, typeof MyComponent], never, never>;
633-
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
634-
}
635-
636569
/****************************************************************************************************
637570
* PARTIAL FILE: interpolation_nested_context.js
638571
****************************************************************************************************/

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/TEST_CASES.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -171,26 +171,6 @@
171171
}
172172
]
173173
},
174-
{
175-
"description": "should support interpolation with custom interpolation config",
176-
"inputFiles": [
177-
"interpolation_custom_config.ts"
178-
],
179-
"expectations": [
180-
{
181-
"extraChecks": [
182-
"verifyPlaceholdersIntegrity",
183-
"verifyUniqueConsts"
184-
],
185-
"files": [
186-
{
187-
"expected": "interpolation_custom_config_template.js",
188-
"generated": "interpolation_custom_config.js"
189-
}
190-
]
191-
}
192-
]
193-
},
194174
{
195175
"description": "should correctly bind to context in nested template",
196176
"inputFiles": [

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_custom_config.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/element_attributes/interpolation_custom_config_template.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/GOLDEN_PARTIAL.js

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -206,58 +206,6 @@ export declare class MyModule {
206206
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
207207
}
208208

209-
/****************************************************************************************************
210-
* PARTIAL FILE: custom_interpolation.js
211-
****************************************************************************************************/
212-
import { Component, NgModule } from '@angular/core';
213-
import * as i0 from "@angular/core";
214-
export class MyComponent {
215-
constructor() {
216-
this.age = 1;
217-
this.other = 'bla';
218-
}
219-
}
220-
MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
221-
MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: `
222-
<div i18n>{age, select, 10 {ten} 20 {twenty} other {{% other %}}}</div>
223-
`, isInline: true, interpolation: ["{%", "%}"] });
224-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{
225-
type: Component,
226-
args: [{
227-
selector: 'my-component',
228-
template: `
229-
<div i18n>{age, select, 10 {ten} 20 {twenty} other {{% other %}}}</div>
230-
`,
231-
interpolation: ['{%', '%}'],
232-
standalone: false
233-
}]
234-
}] });
235-
export class MyModule {
236-
}
237-
MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
238-
MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] });
239-
MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule });
240-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{
241-
type: NgModule,
242-
args: [{ declarations: [MyComponent] }]
243-
}] });
244-
245-
/****************************************************************************************************
246-
* PARTIAL FILE: custom_interpolation.d.ts
247-
****************************************************************************************************/
248-
import * as i0 from "@angular/core";
249-
export declare class MyComponent {
250-
age: number;
251-
other: string;
252-
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
253-
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
254-
}
255-
export declare class MyModule {
256-
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
257-
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>;
258-
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
259-
}
260-
261209
/****************************************************************************************************
262210
* PARTIAL FILE: html_content.js
263211
****************************************************************************************************/

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/TEST_CASES.json

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,6 @@
6363
}
6464
]
6565
},
66-
{
67-
"description": "should support interpolation with custom interpolation config",
68-
"inputFiles": [
69-
"custom_interpolation.ts"
70-
],
71-
"expectations": [
72-
{
73-
"extraChecks": [
74-
"verifyPlaceholdersIntegrity",
75-
"verifyUniqueConsts"
76-
]
77-
}
78-
]
79-
},
8066
{
8167
"description": "should handle icus with html",
8268
"inputFiles": [

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/custom_interpolation.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/icu_logic/custom_interpolation.ts

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/compiler-cli/test/compliance/test_cases/r3_view_compiler_i18n/nested_nodes/GOLDEN_PARTIAL.js

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -296,56 +296,6 @@ export declare class MyModule {
296296
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
297297
}
298298

299-
/****************************************************************************************************
300-
* PARTIAL FILE: interpolation_custom_config.js
301-
****************************************************************************************************/
302-
import { Component, NgModule } from '@angular/core';
303-
import * as i0 from "@angular/core";
304-
export class MyComponent {
305-
constructor() {
306-
this.valueA = '';
307-
}
308-
}
309-
MyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
310-
MyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", type: MyComponent, isStandalone: false, selector: "my-component", ngImport: i0, template: `
311-
<div i18n>{% valueA %}</div>
312-
`, isInline: true, interpolation: ["{%", "%}"] });
313-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyComponent, decorators: [{
314-
type: Component,
315-
args: [{
316-
selector: 'my-component',
317-
template: `
318-
<div i18n>{% valueA %}</div>
319-
`,
320-
interpolation: ['{%', '%}'],
321-
standalone: false
322-
}]
323-
}] });
324-
export class MyModule {
325-
}
326-
MyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
327-
MyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, declarations: [MyComponent] });
328-
MyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule });
329-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "0.0.0-PLACEHOLDER", ngImport: i0, type: MyModule, decorators: [{
330-
type: NgModule,
331-
args: [{ declarations: [MyComponent] }]
332-
}] });
333-
334-
/****************************************************************************************************
335-
* PARTIAL FILE: interpolation_custom_config.d.ts
336-
****************************************************************************************************/
337-
import * as i0 from "@angular/core";
338-
export declare class MyComponent {
339-
valueA: string;
340-
static ɵfac: i0.ɵɵFactoryDeclaration<MyComponent, never>;
341-
static ɵcmp: i0.ɵɵComponentDeclaration<MyComponent, "my-component", never, {}, {}, never, never, false, never>;
342-
}
343-
export declare class MyModule {
344-
static ɵfac: i0.ɵɵFactoryDeclaration<MyModule, never>;
345-
static ɵmod: i0.ɵɵNgModuleDeclaration<MyModule, [typeof MyComponent], never, never>;
346-
static ɵinj: i0.ɵɵInjectorDeclaration<MyModule>;
347-
}
348-
349299
/****************************************************************************************************
350300
* PARTIAL FILE: interpolation_complex_expressions.js
351301
****************************************************************************************************/

0 commit comments

Comments
 (0)