From 4853129a7de032da0f2f0332daa97e509da4ab24 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Sat, 22 Feb 2025 09:02:44 +0100 Subject: [PATCH] test(core): clean up explicit standalone flags from tests (#60062) Now that standalone is the default, we don't need to specify it in tests anymore. PR Close #60062 --- .../rxjs-interop/test/to_observable_spec.ts | 1 - .../test/acceptance/after_render_hook_spec.ts | 9 +- .../acceptance/authoring/model_inputs_spec.ts | 56 ++-- .../authoring/output_function_spec.ts | 20 -- .../authoring/signal_inputs_spec.ts | 23 +- .../authoring/signal_queries_spec.ts | 33 +- .../core/test/acceptance/bootstrap_spec.ts | 6 +- .../change_detection_signals_in_zones_spec.ts | 46 +-- .../test/acceptance/change_detection_spec.ts | 6 +- ...change_detection_transplanted_view_spec.ts | 10 - .../core/test/acceptance/component_spec.ts | 12 - packages/core/test/acceptance/content_spec.ts | 39 +-- .../test/acceptance/control_flow_for_spec.ts | 42 +-- .../test/acceptance/control_flow_if_spec.ts | 55 +--- .../acceptance/control_flow_switch_spec.ts | 12 +- packages/core/test/acceptance/csp_spec.ts | 9 +- packages/core/test/acceptance/defer_spec.ts | 131 +------- .../core/test/acceptance/destroy_ref_spec.ts | 11 - packages/core/test/acceptance/di_spec.ts | 65 +--- .../core/test/acceptance/directive_spec.ts | 2 +- .../env_injector_standalone_spec.ts | 8 +- .../acceptance/environment_injector_spec.ts | 1 - packages/core/test/acceptance/hmr_spec.ts | 92 +----- .../test/acceptance/host_directives_spec.ts | 283 ++++++++---------- packages/core/test/acceptance/i18n_spec.ts | 1 - .../inherit_definition_feature_spec.ts | 4 - .../test/acceptance/injector_profiler_spec.ts | 24 +- .../core/test/acceptance/integration_spec.ts | 1 - .../core/test/acceptance/internal_spec.ts | 11 - packages/core/test/acceptance/let_spec.ts | 21 +- .../core/test/acceptance/listener_spec.ts | 12 +- .../core/test/acceptance/ng_module_spec.ts | 7 - packages/core/test/acceptance/pipe_spec.ts | 3 +- packages/core/test/acceptance/query_spec.ts | 74 ++--- .../test/acceptance/renderer_factory_spec.ts | 5 - .../core/test/acceptance/security_spec.ts | 41 --- .../acceptance/standalone_injector_spec.ts | 2 - .../core/test/acceptance/standalone_spec.ts | 69 +---- packages/core/test/acceptance/styling_spec.ts | 9 - packages/core/test/application_ref_spec.ts | 1 - .../test/change_detection_scheduler_spec.ts | 61 ++-- packages/core/test/component_fixture_spec.ts | 13 +- packages/core/test/defer_fixture_spec.ts | 15 - .../test/render3/change_detection_spec.ts | 1 - .../core/test/render3/component_ref_spec.ts | 5 - .../core/test/render3/deps_tracker_spec.ts | 80 +++-- packages/core/test/render3/di_spec.ts | 5 +- .../core/test/render3/instructions_spec.ts | 2 - .../core/test/render3/integration_spec.ts | 25 -- .../test/render3/microtask_effect_spec.ts | 27 -- packages/core/test/render3/providers_spec.ts | 5 - packages/core/test/render3/query_spec.ts | 5 - .../core/test/render3/reactive_safety_spec.ts | 8 - packages/core/test/render3/reactivity_spec.ts | 40 +-- packages/core/test/test_bed_effect_spec.ts | 5 - packages/core/test/test_bed_spec.ts | 36 +-- packages/core/test/zone/ng_zone_spec.ts | 1 - 57 files changed, 317 insertions(+), 1274 deletions(-) diff --git a/packages/core/rxjs-interop/test/to_observable_spec.ts b/packages/core/rxjs-interop/test/to_observable_spec.ts index 4c2d5334d75..3a0ee839411 100644 --- a/packages/core/rxjs-interop/test/to_observable_spec.ts +++ b/packages/core/rxjs-interop/test/to_observable_spec.ts @@ -25,7 +25,6 @@ describe('toObservable()', () => { @Component({ template: '', - standalone: true, }) class Cmp {} diff --git a/packages/core/test/acceptance/after_render_hook_spec.ts b/packages/core/test/acceptance/after_render_hook_spec.ts index 0ab9ebb9089..2d39e8b7eeb 100644 --- a/packages/core/test/acceptance/after_render_hook_spec.ts +++ b/packages/core/test/acceptance/after_render_hook_spec.ts @@ -239,7 +239,6 @@ describe('after render hooks', () => { let log: string[] = []; @Component({ - standalone: true, template: ``, }) class MyComp { @@ -852,12 +851,12 @@ describe('after render hooks', () => { const appRef = TestBed.inject(ApplicationRef); const counter = signal(0); - @Component({standalone: true, template: '{{counter()}}'}) + @Component({template: '{{counter()}}'}) class Reader { counter = counter; } - @Component({standalone: true, template: ''}) + @Component({template: ''}) class Writer { ngAfterViewInit(): void { counter.set(1); @@ -1364,7 +1363,6 @@ describe('after render hooks', () => { @Component({ selector: 'test-component', - standalone: true, template: ` {{counter()}} `, }) class TestCmp { @@ -1393,7 +1391,6 @@ describe('after render hooks', () => { it('allows updating state and calling markForCheck in afterRender', async () => { @Component({ selector: 'test-component', - standalone: true, template: ` {{counter}} `, }) class TestCmp { @@ -1425,7 +1422,6 @@ describe('after render hooks', () => { const counter = signal(0); @Component({ selector: 'test-component', - standalone: true, template: `{{counter()}}`, }) class TestCmp { @@ -1467,7 +1463,6 @@ describe('after render hooks', () => { @Component({ selector: 'test-component', - standalone: true, template: ` {{counter()}} `, }) class TestCmp { diff --git a/packages/core/test/acceptance/authoring/model_inputs_spec.ts b/packages/core/test/acceptance/authoring/model_inputs_spec.ts index f7129d6354b..e26daf95056 100644 --- a/packages/core/test/acceptance/authoring/model_inputs_spec.ts +++ b/packages/core/test/acceptance/authoring/model_inputs_spec.ts @@ -24,14 +24,13 @@ import {TestBed} from '@angular/core/testing'; describe('model inputs', () => { it('should support two-way binding to a signal', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -60,14 +59,13 @@ describe('model inputs', () => { }); it('should support two-way binding to a non-signal value', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -96,7 +94,7 @@ describe('model inputs', () => { }); it('should support two-way binding a signal to a non-model input/output pair', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { @Input() value = 0; @Output() valueChange = new EventEmitter(); @@ -104,7 +102,6 @@ describe('model inputs', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -135,14 +132,13 @@ describe('model inputs', () => { }); it('should support a one-way property binding to a model', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -174,14 +170,13 @@ describe('model inputs', () => { it('should emit to the change output when the model changes', () => { const emittedValues: number[] = []; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -215,14 +210,13 @@ describe('model inputs', () => { it('should not emit to the change event when then property binding changes', () => { const emittedValues: number[] = []; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -247,14 +241,13 @@ describe('model inputs', () => { it('should support binding to the model input and output separately', () => { const emittedValues: number[] = []; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -288,14 +281,13 @@ describe('model inputs', () => { }); it('should support two-way binding to a model with an alias', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0, {alias: 'alias'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -327,14 +319,13 @@ describe('model inputs', () => { it('should support binding to an aliased model input and output separately', () => { const emittedValues: number[] = []; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0, {alias: 'alias'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -368,7 +359,7 @@ describe('model inputs', () => { }); it('should throw if a required model input is accessed too early', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model.required(); @@ -379,7 +370,6 @@ describe('model inputs', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -392,7 +382,7 @@ describe('model inputs', () => { }); it('should throw if a required model input is updated too early', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model.required(); @@ -403,7 +393,6 @@ describe('model inputs', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -418,14 +407,13 @@ describe('model inputs', () => { it('should stop emitting to the output on destroy', () => { let emittedEvents = 0; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -457,12 +445,11 @@ describe('model inputs', () => { value = model(0); } - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir extends BaseDir {} @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -494,7 +481,6 @@ describe('model inputs', () => { it('should reflect changes to a two-way-bound signal in the DOM', () => { @Directive({ selector: '[dir]', - standalone: true, host: { '(click)': 'increment()', }, @@ -509,7 +495,6 @@ describe('model inputs', () => { @Component({ template: ' Current value: {{value()}}', - standalone: true, imports: [Dir], }) class App { @@ -532,7 +517,7 @@ describe('model inputs', () => { it('should support ngOnChanges for two-way model bindings', () => { const changes: SimpleChange[] = []; - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir implements OnChanges { value = model(0); @@ -545,7 +530,6 @@ describe('model inputs', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -582,7 +566,7 @@ describe('model inputs', () => { }); it('should not throw for mixed model and output subscriptions', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { model = model(0); @Output() output = new EventEmitter(); @@ -594,7 +578,6 @@ describe('model inputs', () => { template: `
`, - standalone: true, imports: [Dir], }) class App { @@ -607,7 +590,7 @@ describe('model inputs', () => { }); it('should support two-way binding to a signal @for loop variable', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0); } @@ -618,7 +601,6 @@ describe('model inputs', () => {
} `, - standalone: true, imports: [Dir], }) class App { @@ -647,14 +629,13 @@ describe('model inputs', () => { }); it('should assign a debugName to the underlying watcher node when a debugName is provided', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model(0, {debugName: 'TEST_DEBUG_NAME'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -670,14 +651,13 @@ describe('model inputs', () => { }); it('should assign a debugName to the underlying watcher node when a debugName is provided to a required model', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = model.required({debugName: 'TEST_DEBUG_NAME'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { diff --git a/packages/core/test/acceptance/authoring/output_function_spec.ts b/packages/core/test/acceptance/authoring/output_function_spec.ts index 2962b3941f0..7fc7d7e8396 100644 --- a/packages/core/test/acceptance/authoring/output_function_spec.ts +++ b/packages/core/test/acceptance/authoring/output_function_spec.ts @@ -30,7 +30,6 @@ describe('output() function', () => { it('should support emitting values', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -38,7 +37,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -60,7 +58,6 @@ describe('output() function', () => { it('should support emitting void values', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -68,7 +65,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -90,7 +86,6 @@ describe('output() function', () => { it('should error when emitting to a destroyed output', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -102,7 +97,6 @@ describe('output() function', () => {
} `, - standalone: true, imports: [Dir], }) class App { @@ -128,7 +122,6 @@ describe('output() function', () => { it('should error when subscribing to a destroyed output', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -140,7 +133,6 @@ describe('output() function', () => {
} `, - standalone: true, imports: [Dir], }) class App { @@ -168,7 +160,6 @@ describe('output() function', () => { it('should run listeners outside of `emit` reactive context', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -184,7 +175,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -212,7 +202,6 @@ describe('output() function', () => { it('should support using a `Subject` as source', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla$ = new Subject(); @@ -221,7 +210,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -243,7 +231,6 @@ describe('output() function', () => { it('should support using a `BehaviorSubject` as source', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla$ = new BehaviorSubject(1); @@ -252,7 +239,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -274,7 +260,6 @@ describe('output() function', () => { it('should support using an `EventEmitter` as source', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla$ = new EventEmitter(); @@ -283,7 +268,6 @@ describe('output() function', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -305,7 +289,6 @@ describe('output() function', () => { it('should support lazily creating an observer upon subscription', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { streamStarted = false; @@ -322,7 +305,6 @@ describe('output() function', () => {
`, - standalone: true, imports: [Dir], }) class App {} @@ -340,7 +322,6 @@ describe('output() function', () => { it('should report subscription listener errors to `ErrorHandler` and continue', () => { @Directive({ selector: '[dir]', - standalone: true, }) class Dir { onBla = output(); @@ -350,7 +331,6 @@ describe('output() function', () => { template: `
`, - standalone: true, imports: [Dir], }) class App {} diff --git a/packages/core/test/acceptance/authoring/signal_inputs_spec.ts b/packages/core/test/acceptance/authoring/signal_inputs_spec.ts index d35460ea0c7..8d99b62680b 100644 --- a/packages/core/test/acceptance/authoring/signal_inputs_spec.ts +++ b/packages/core/test/acceptance/authoring/signal_inputs_spec.ts @@ -36,7 +36,6 @@ describe('signal inputs', () => { it('should be possible to bind to an input', () => { @Component({ selector: 'input-comp', - standalone: true, template: 'input:{{input()}}', }) class InputComp { @@ -44,7 +43,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -66,7 +64,6 @@ describe('signal inputs', () => { it('should be possible to use an input in a computed expression', () => { @Component({ selector: 'input-comp', - standalone: true, template: 'changed:{{changed()}}', }) class InputComp { @@ -75,7 +72,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -99,7 +95,6 @@ describe('signal inputs', () => { @Component({ selector: 'input-comp', - standalone: true, template: '', }) class InputComp { @@ -113,7 +108,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -137,7 +131,6 @@ describe('signal inputs', () => { it('should support transforms', () => { @Component({ selector: 'input-comp', - standalone: true, template: 'input:{{input()}}', }) class InputComp { @@ -145,7 +138,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -165,7 +157,6 @@ describe('signal inputs', () => { let transformRunCount = 0; @Component({ selector: 'input-comp', - standalone: true, template: '', }) class InputComp { @@ -175,7 +166,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -193,7 +183,6 @@ describe('signal inputs', () => { it('should throw error if a required input is accessed too early', () => { @Component({ selector: 'input-comp', - standalone: true, template: 'input:{{input()}}', }) class InputComp { @@ -205,7 +194,6 @@ describe('signal inputs', () => { } @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -226,13 +214,11 @@ describe('signal inputs', () => { @Component({ selector: 'input-comp', - standalone: true, template: 'input:{{input()}}', }) class InputComp extends BaseDir {} @Component({ - standalone: true, template: ``, imports: [InputComp], }) @@ -252,7 +238,7 @@ describe('signal inputs', () => { }); it('should support two-way binding to signal input and @Output decorated member', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = input(0); @Output() valueChange = new EventEmitter(); @@ -260,7 +246,6 @@ describe('signal inputs', () => { @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -290,14 +275,13 @@ describe('signal inputs', () => { }); it('should assign a debugName to the input signal node when a debugName is provided', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = input(0, {debugName: 'TEST_DEBUG_NAME'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { @@ -312,14 +296,13 @@ describe('signal inputs', () => { }); it('should assign a debugName to the input signal node when a debugName is provided to a required input', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = input.required({debugName: 'TEST_DEBUG_NAME'}); } @Component({ template: '
', - standalone: true, imports: [Dir], }) class App { diff --git a/packages/core/test/acceptance/authoring/signal_queries_spec.ts b/packages/core/test/acceptance/authoring/signal_queries_spec.ts index 1011ba8685b..a68b258ed0d 100644 --- a/packages/core/test/acceptance/authoring/signal_queries_spec.ts +++ b/packages/core/test/acceptance/authoring/signal_queries_spec.ts @@ -28,7 +28,6 @@ describe('queries as signals', () => { describe('view', () => { it('should query for an optional element in a template', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -51,7 +50,6 @@ describe('queries as signals', () => { let result: {} | undefined = {}; @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -68,7 +66,6 @@ describe('queries as signals', () => { it('should query for a required element in a template', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -88,7 +85,6 @@ describe('queries as signals', () => { it('should throw if required query is read in the constructor', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -107,7 +103,6 @@ describe('queries as signals', () => { it('should query for multiple elements in a template', () => { @Component({ - standalone: true, template: `
@if (show) { @@ -144,7 +139,6 @@ describe('queries as signals', () => { let result: readonly ElementRef[] | undefined; @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -161,7 +155,6 @@ describe('queries as signals', () => { it('should return the same array instance when there were no changes in results', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -183,7 +176,6 @@ describe('queries as signals', () => { let computeCount = 0; @Component({ - standalone: true, template: `
@if (show) { @@ -212,7 +204,6 @@ describe('queries as signals', () => { it('should return the same array instance when there were no changes in results after view manipulation', () => { @Component({ - standalone: true, template: `
@if (show) { @@ -242,7 +233,6 @@ describe('queries as signals', () => { it('should be empty when no query matches exist', () => { @Component({ - standalone: true, template: ``, }) class AppComponent { @@ -259,7 +249,6 @@ describe('queries as signals', () => { it('should assign a debugName to the underlying signal node when a debugName is provided', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -282,7 +271,6 @@ describe('queries as signals', () => { it('should assign a debugName to the underlying signal node when a debugName is provided to a required viewChild query', () => { @Component({ - standalone: true, template: `
`, }) class AppComponent { @@ -299,7 +287,6 @@ describe('queries as signals', () => { it('should run content queries defined on components', () => { @Component({ selector: 'query-cmp', - standalone: true, template: `{{noOfEls()}}`, }) class QueryComponent { @@ -316,7 +303,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, imports: [QueryComponent], template: ` @@ -347,7 +333,6 @@ describe('queries as signals', () => { it('should run content queries defined on directives', () => { @Directive({ selector: '[query]', - standalone: true, host: {'[textContent]': `noOfEls()`}, }) class QueryDir { @@ -364,7 +349,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, imports: [QueryDir], template: `
@@ -393,18 +377,17 @@ describe('queries as signals', () => { }); it('should not return partial results during the first-time view rendering', () => { - @Directive({selector: '[marker]', standalone: true}) + @Directive({selector: '[marker]'}) class MarkerForResults {} @Directive({ selector: '[declare]', - standalone: true, }) class DeclareQuery { results = contentChildren(MarkerForResults); } - @Directive({selector: '[inspect]', standalone: true}) + @Directive({selector: '[inspect]'}) class InspectsQueryResults { constructor(declaration: DeclareQuery) { // we should _not_ get partial query results while the view is still creating @@ -413,7 +396,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, imports: [MarkerForResults, InspectsQueryResults, DeclareQuery], template: `
@@ -437,7 +419,6 @@ describe('queries as signals', () => { it('should be empty when no query matches exist', () => { @Directive({ selector: '[declare]', - standalone: true, }) class DeclareQuery { result = contentChild('unknown'); @@ -445,7 +426,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, imports: [DeclareQuery], template: `
`, }) @@ -464,7 +444,6 @@ describe('queries as signals', () => { it('should assign a debugName to the underlying signal node when a debugName is provided', () => { @Component({ selector: 'query-cmp', - standalone: true, template: ``, }) class QueryComponent { @@ -476,7 +455,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, imports: [QueryComponent], template: ` @@ -508,7 +486,6 @@ describe('queries as signals', () => { let recomputeCount = 0; @Component({ - standalone: true, template: `
@if (show) { @@ -544,7 +521,6 @@ describe('queries as signals', () => { let recomputeCount = 0; @Component({ - standalone: true, template: `
@if (show) { @@ -583,7 +559,6 @@ describe('queries as signals', () => { // https://github.com/angular/angular/issues/54450 @Component({ selector: 'query-cmp', - standalone: true, template: ``, }) class QueryComponent { @@ -592,7 +567,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, template: ``, }) class TestComponent { @@ -615,7 +589,6 @@ describe('queries as signals', () => { describe('mix of signal and decorator queries', () => { it('should allow specifying both types of queries in one component', () => { @Component({ - standalone: true, template: `
@if (show) { @@ -649,7 +622,6 @@ describe('queries as signals', () => { it('should allow combination via inheritance of both types of queries in one component', () => { @Component({ - standalone: true, template: `
@if (show) { @@ -663,7 +635,6 @@ describe('queries as signals', () => { } @Component({ - standalone: true, template: `
@if (show) { diff --git a/packages/core/test/acceptance/bootstrap_spec.ts b/packages/core/test/acceptance/bootstrap_spec.ts index 0695479cf49..6c5dbd12c4b 100644 --- a/packages/core/test/acceptance/bootstrap_spec.ts +++ b/packages/core/test/acceptance/bootstrap_spec.ts @@ -61,10 +61,10 @@ describe('bootstrap', () => { it( 'should allow injecting VCRef into the root (bootstrapped) component', withBody('before||after', async () => { - @Component({selector: 'dynamic-cmp', standalone: true, template: 'dynamic'}) + @Component({selector: 'dynamic-cmp', template: 'dynamic'}) class DynamicCmp {} - @Component({selector: 'test-cmp', standalone: true, template: '(test)'}) + @Component({selector: 'test-cmp', template: '(test)'}) class TestCmp { constructor(public vcRef: ViewContainerRef) {} } @@ -305,7 +305,6 @@ describe('bootstrap', () => { 'should throw when standalone component is used in @NgModule.bootstrap', withBody('', async () => { @Component({ - standalone: true, selector: 'standalone-comp', template: '...', }) @@ -384,7 +383,6 @@ describe('bootstrap', () => { 'should throw when standalone component wrapped in `forwardRef` is used in @NgModule.bootstrap', withBody('', async () => { @Component({ - standalone: true, selector: 'standalone-comp', template: '...', }) diff --git a/packages/core/test/acceptance/change_detection_signals_in_zones_spec.ts b/packages/core/test/acceptance/change_detection_signals_in_zones_spec.ts index e4572c8c00b..714b0be18f4 100644 --- a/packages/core/test/acceptance/change_detection_signals_in_zones_spec.ts +++ b/packages/core/test/acceptance/change_detection_signals_in_zones_spec.ts @@ -29,7 +29,6 @@ describe('CheckAlways components', () => { it('can read a signal', () => { @Component({ template: `{{value()}}`, - standalone: true, }) class CheckAlwaysCmp { value = signal('initial'); @@ -48,7 +47,6 @@ describe('CheckAlways components', () => { it('should properly remove stale dependencies from the signal graph', () => { @Component({ template: `{{show() ? name() + ' aged ' + age() : 'anonymous'}}`, - standalone: true, }) class CheckAlwaysCmp { name = signal('John'); @@ -81,7 +79,6 @@ describe('CheckAlways components', () => { const value = signal('initial'); @Component({ template: `{{value()}}`, - standalone: true, selector: 'check-always', }) class CheckAlwaysCmp { @@ -89,7 +86,6 @@ describe('CheckAlways components', () => { } @Component({ template: ``, - standalone: true, imports: [CheckAlwaysCmp], changeDetection: ChangeDetectionStrategy.OnPush, }) @@ -110,7 +106,6 @@ describe('CheckAlways components', () => { @Component({ template: '{{val()}}', - standalone: true, selector: 'a-comp', }) class A { @@ -118,7 +113,6 @@ describe('CheckAlways components', () => { } @Component({ template: '{{val()}}', - standalone: true, selector: 'b-comp', }) class B { @@ -132,7 +126,7 @@ describe('CheckAlways components', () => { } } - @Component({template: '-', standalone: true, imports: [A, B]}) + @Component({template: '-', imports: [A, B]}) class App {} const fixture = TestBed.createComponent(App); @@ -155,7 +149,6 @@ describe('CheckAlways components', () => { @Component({ template: '', selector: 'child', - standalone: true, }) class Child { ngDoCheck() { @@ -166,7 +159,7 @@ describe('CheckAlways components', () => { } } } - @Component({template: '{{val()}}', standalone: true, imports: [Child]}) + @Component({template: '{{val()}}', imports: [Child]}) class App { val = val; } @@ -187,7 +180,6 @@ describe('CheckAlways components', () => { const val = signal(0); @Component({ template: '{{val()}}', - standalone: true, }) class App { val = val; @@ -212,7 +204,6 @@ describe('OnPush components with signals', () => { @Component({ template: `{{value()}}{{incrementTemplateExecutions()}}`, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class OnPushCmp { numTemplateExecutions = 0; @@ -243,7 +234,6 @@ describe('OnPush components with signals', () => { @Component({ template: `{{memo()}}{{incrementTemplateExecutions()}}`, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class OnPushCmp { numTemplateExecutions = 0; @@ -278,7 +268,6 @@ describe('OnPush components with signals', () => { selector: 'child', template: `child`, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class ChildReadingSignalCmp { constructor() { @@ -293,7 +282,6 @@ describe('OnPush components with signals', () => { `, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgIf, ChildReadingSignalCmp], }) class OnPushCmp { @@ -323,7 +311,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'with-input-setter', - standalone: true, template: '{{test}}', }) class WithInputSetter { @@ -342,7 +329,6 @@ describe('OnPush components with signals', () => { `, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgIf, WithInputSetter], }) class OnPushCmp { @@ -373,7 +359,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'with-query-setter', - standalone: true, template: '
child
', }) class WithQuerySetter { @@ -393,7 +378,6 @@ describe('OnPush components with signals', () => { `, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgIf, WithQuerySetter], }) class OnPushCmp { @@ -425,7 +409,6 @@ describe('OnPush components with signals', () => { selector: 'child', host: {'[class.blue]': 'useBlue()'}, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class MyCmp { useBlue = useBlue; @@ -455,7 +438,6 @@ describe('OnPush components with signals', () => { selector: 'child', host: {'[class.blue]': 'useBlue()'}, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class ChildCmp { useBlue = signal(false); @@ -471,7 +453,6 @@ describe('OnPush components with signals', () => { template: ``, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ChildCmp], - standalone: true, }) class ParentCmp {} const fixture = TestBed.createComponent(ParentCmp); @@ -495,7 +476,6 @@ describe('OnPush components with signals', () => { selector: 'child', host: {'[class.blue]': 'useBlue()'}, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class ChildCmp { useBlue = signal(false); @@ -505,7 +485,6 @@ describe('OnPush components with signals', () => { template: ` {{parentSignalValue()}}`, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ChildCmp], - standalone: true, selector: 'parent', }) class ParentCmp { @@ -517,7 +496,6 @@ describe('OnPush components with signals', () => { template: ``, changeDetection: ChangeDetectionStrategy.OnPush, imports: [ParentCmp], - standalone: true, }) class TestWrapper {} @@ -550,7 +528,6 @@ describe('OnPush components with signals', () => { const counter = signal(0); @Directive({ - standalone: true, selector: '[misunderstood]', }) class MisunderstoodDir { @@ -561,7 +538,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'test-component', - standalone: true, imports: [MisunderstoodDir], template: ` {{counter()}}
{{ 'force advance()' }} @@ -583,7 +559,6 @@ describe('OnPush components with signals', () => { const counter = signal(0); @Directive({ - standalone: true, selector: '[misunderstood]', }) class MisunderstoodDir { @@ -594,7 +569,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'test-component', - standalone: true, imports: [MisunderstoodDir], template: ` {{counter()}}
@@ -614,7 +588,6 @@ describe('OnPush components with signals', () => { it('should allow writing to signals in afterViewInit', () => { @Component({ template: '{{loading()}}', - standalone: true, }) class MyComp { loading = signal(true); @@ -634,7 +607,6 @@ describe('OnPush components with signals', () => { @Component({ template: '{{val()}}{{incrementChecks()}}', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) class App { @@ -664,7 +636,6 @@ describe('OnPush components with signals', () => { @if (true) { } {{val()}} `, - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) class MyComp { @@ -685,7 +656,6 @@ describe('OnPush components with signals', () => { {{createEmbeddedView(template)}} {{val()}} `, - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) class MyComp { @@ -708,7 +678,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'signal-component', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgIf], template: `
{{value()}}
`, }) @@ -727,7 +696,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'signal-component', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgFor], template: `
{{value()}}
`, }) @@ -746,7 +714,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'signal-component', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [NgIf], template: ` {{componentSignal()}} @@ -776,7 +743,6 @@ describe('OnPush components with signals', () => { it('re-executes deep embedded template if signal updates', () => { @Component({ selector: 'signal-component', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgIf], template: ` @@ -807,7 +773,6 @@ describe('OnPush components with signals', () => { template: ` {{value()}} `, - standalone: true, }) class Test { value = signal('initial'); @@ -839,7 +804,6 @@ describe('OnPush components with signals', () => { template: ` {{value()}} `, - standalone: true, }) class Test { value = signal('initial'); @@ -873,7 +837,6 @@ describe('OnPush components with signals', () => { @Component({ selector: 'signal-component', changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, template: `{{value()}}`, }) class SignalComponent { @@ -891,7 +854,6 @@ describe('OnPush components with signals', () => { {{incrementChecks()}}`, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, imports: [SignalComponent], }) class OnPushParent { @@ -956,7 +918,6 @@ describe('OnPush components with signals', () => { @Component({ template: '', selector: 'child', - standalone: true, }) class Child { ngOnInit() { @@ -967,7 +928,6 @@ describe('OnPush components with signals', () => { @Component({ template: '{{val()}} ', imports: [Child], - standalone: true, }) class SignalComponent { val = val; @@ -986,7 +946,6 @@ describe('OnPush components with signals', () => { @Component({ template: '{{double()}}', selector: 'child', - standalone: true, }) class Child { double = double; @@ -995,7 +954,6 @@ describe('OnPush components with signals', () => { @Component({ template: '|{{double()}}||', imports: [Child], - standalone: true, }) class SignalComponent { double = double; diff --git a/packages/core/test/acceptance/change_detection_spec.ts b/packages/core/test/acceptance/change_detection_spec.ts index 7a6debb944d..c8eea48acb3 100644 --- a/packages/core/test/acceptance/change_detection_spec.ts +++ b/packages/core/test/acceptance/change_detection_spec.ts @@ -115,7 +115,6 @@ describe('change detection', () => { @Component({ selector: 'onpush', template: '', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) class OnPushComponent { @@ -126,7 +125,7 @@ describe('change detection', () => { } } - @Component({template: '', standalone: true}) + @Component({template: ''}) class Container { @ViewChild('template', {read: ViewContainerRef, static: true}) vcr!: ViewContainerRef; } @@ -235,7 +234,6 @@ describe('change detection', () => { selector: `test-cmpt`, template: `{{counter}}|`, changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, }) class TestCmpt { counter = 0; @@ -249,7 +247,6 @@ describe('change detection', () => { @Component({ selector: 'dynamic-cmpt', template: `dynamic|{{binding}}`, - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) class DynamicCmpt { @@ -1410,7 +1407,6 @@ describe('change detection', () => { @Component({ changeDetection: ChangeDetectionStrategy.OnPush, - standalone: true, template: '{{state}}{{resolveReadPromise()}}', }) class MyApp { diff --git a/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts b/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts index 2041f649b63..397fa6e292a 100644 --- a/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts +++ b/packages/core/test/acceptance/change_detection_transplanted_view_spec.ts @@ -986,7 +986,6 @@ describe('change detection for transplanted views', () => { it('does not cause error if running change detection on detached view', () => { @Component({ - standalone: true, selector: 'insertion', template: ``, }) @@ -999,7 +998,6 @@ describe('change detection for transplanted views', () => { } @Component({ - standalone: true, template: ` @@ -1017,7 +1015,6 @@ describe('change detection for transplanted views', () => { it('backwards reference still updated if detaching root during change detection', () => { @Component({ - standalone: true, selector: 'insertion', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, @@ -1033,7 +1030,6 @@ describe('change detection for transplanted views', () => { @Component({ template: '{{value}}', selector: 'declaration', - standalone: true, }) class Declaration { @ViewChild('template', {static: true}) transplantedTemplate!: TemplateRef<{}>; @@ -1041,7 +1037,6 @@ describe('change detection for transplanted views', () => { } @Component({ - standalone: true, template: ` @@ -1079,7 +1074,6 @@ describe('change detection for transplanted views', () => { @Component({ selector: 'insertion', imports: [NgTemplateOutlet], - standalone: true, template: ` `, }) class Insertion { @@ -1090,7 +1084,6 @@ describe('change detection for transplanted views', () => { @Component({ imports: [Insertion, AsyncPipe], template: ` {{newObservable() | async}} `, - standalone: true, selector: 'declaration', }) class Declaration { @@ -1100,7 +1093,6 @@ describe('change detection for transplanted views', () => { } } @Component({ - standalone: true, imports: [Declaration, Insertion], template: '', }) @@ -1137,7 +1129,6 @@ describe('change detection for transplanted views', () => { fail('console errored with ' + v); }); @Component({ - standalone: true, selector: 'insertion', template: ``, changeDetection: ChangeDetectionStrategy.OnPush, @@ -1151,7 +1142,6 @@ describe('change detection for transplanted views', () => { } @Component({ - standalone: true, template: ` hello world diff --git a/packages/core/test/acceptance/component_spec.ts b/packages/core/test/acceptance/component_spec.ts index 3586dfa1fa4..80bbbeca246 100644 --- a/packages/core/test/acceptance/component_spec.ts +++ b/packages/core/test/acceptance/component_spec.ts @@ -491,7 +491,6 @@ describe('component', () => { @Component({ selector: 'comp', template: 'hello', - standalone: true, imports: [Comp, NgIf], }) class Comp { @@ -500,7 +499,6 @@ describe('component', () => { @Component({ template: '', - standalone: true, imports: [Comp], }) class App {} @@ -521,7 +519,6 @@ describe('component', () => { @Component({ selector: 'comp', template: 'hello', - standalone: true, imports: [forwardRef(() => Comp), NgIf], }) class Comp { @@ -530,7 +527,6 @@ describe('component', () => { @Component({ template: '', - standalone: true, imports: [Comp], }) class App {} @@ -805,7 +801,6 @@ describe('component', () => { describe('createComponent', () => { it('should create an instance of a standalone component', () => { @Component({ - standalone: true, template: 'Hello {{ name }}!', }) class StandaloneComponent { @@ -858,7 +853,6 @@ describe('component', () => { it('should render projected content', () => { @Component({ - standalone: true, template: ` | | @@ -890,7 +884,6 @@ describe('component', () => { it('should be able to inject tokens from EnvironmentInjector', () => { const A = new InjectionToken('A'); @Component({ - standalone: true, template: 'Token: {{ a }}', }) class StandaloneComponent { @@ -912,7 +905,6 @@ describe('component', () => { const A = new InjectionToken('A'); const B = new InjectionToken('B'); @Component({ - standalone: true, template: '{{ a }} and {{ b }}', }) class ChildStandaloneComponent { @@ -921,7 +913,6 @@ describe('component', () => { } @Component({ - standalone: true, template: 'Tokens:
', providers: [{provide: A, useValue: 'ElementInjector(A)'}], }) @@ -961,7 +952,6 @@ describe('component', () => { const selector = 'standalone-comp'; @Component({ selector, - standalone: true, template: 'Hello {{ name }}!', }) class StandaloneComponent { @@ -988,7 +978,6 @@ describe('component', () => { () => { @Component({ selector: '.some-class', - standalone: true, template: 'Hello {{ name }}!', }) class StandaloneComponent { @@ -1048,7 +1037,6 @@ describe('component', () => { @Component({ selector: 'standalone-component', - standalone: true, template: ` diff --git a/packages/core/test/acceptance/content_spec.ts b/packages/core/test/acceptance/content_spec.ts index 61c07af68fb..675b8ab237b 100644 --- a/packages/core/test/acceptance/content_spec.ts +++ b/packages/core/test/acceptance/content_spec.ts @@ -1539,12 +1539,10 @@ describe('projection', () => { `Two fallback` + `Three fallback `, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1566,12 +1564,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Fallback content`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1594,12 +1590,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `I have no divs|I have no spans`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1622,12 +1616,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Wildcard fallback|Span fallback`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1664,12 +1656,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Fallback`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1687,13 +1677,12 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Value: {{value}}`, - standalone: true, }) class Projection { value = 0; } - @Component({standalone: true, imports: [Projection], template: ``}) + @Component({imports: [Projection], template: ``}) class App { @ViewChild(Projection) projection!: Projection; } @@ -1717,7 +1706,6 @@ describe('projection', () => { Value: {{value}} `, - standalone: true, }) class Projection { value = 0; @@ -1727,7 +1715,7 @@ describe('projection', () => { } } - @Component({standalone: true, imports: [Projection], template: ``}) + @Component({imports: [Projection], template: ``}) class App {} const fixture = TestBed.createComponent(App); @@ -1744,7 +1732,6 @@ describe('projection', () => { @Directive({ selector: 'fallback-dir', - standalone: true, }) class FallbackDir implements OnDestroy { constructor() { @@ -1759,13 +1746,11 @@ describe('projection', () => { @Component({ selector: 'projection', template: ``, - standalone: true, imports: [FallbackDir], }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @if (hasProjection) { @@ -1791,7 +1776,6 @@ describe('projection', () => { @Directive({ selector: 'fallback-dir', - standalone: true, }) class FallbackDir { constructor() { @@ -1802,7 +1786,6 @@ describe('projection', () => { @Component({ selector: 'projection', template: ``, - standalone: true, imports: [FallbackDir], }) class Projection { @@ -1810,7 +1793,6 @@ describe('projection', () => { } @Component({ - standalone: true, imports: [Projection], template: ``, }) @@ -1828,7 +1810,6 @@ describe('projection', () => { it('should be able to inject the host component from inside the fallback content', () => { @Directive({ selector: 'fallback-dir', - standalone: true, }) class FallbackDir { host = inject(Projection); @@ -1837,7 +1818,6 @@ describe('projection', () => { @Component({ selector: 'projection', template: ``, - standalone: true, imports: [FallbackDir], }) class Projection { @@ -1845,7 +1825,6 @@ describe('projection', () => { } @Component({ - standalone: true, imports: [Projection], template: ``, }) @@ -1861,7 +1840,6 @@ describe('projection', () => { it('should render the fallback content if content is not provided through projectableNodes', () => { @Component({ - standalone: true, template: `One fallback|` + `Two fallback|Three fallback`, @@ -1886,7 +1864,6 @@ describe('projection', () => { it('should render the content through projectableNodes along with fallback', () => { @Component({ - standalone: true, template: `One fallback|` + `Two fallback|Three fallback`, @@ -1914,7 +1891,6 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Fallback`, - standalone: true, }) class Projection { @ViewChild('template') template!: TemplateRef; @@ -1926,7 +1902,6 @@ describe('projection', () => { } @Component({ - standalone: true, imports: [Projection], template: ``, }) @@ -1950,7 +1925,6 @@ describe('projection', () => { Inner header fallback Inner footer fallback `, - standalone: true, }) class InnerProjection {} @@ -1962,13 +1936,11 @@ describe('projection', () => { Outer footer fallback `, - standalone: true, imports: [InnerProjection], }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` @@ -1990,7 +1962,6 @@ describe('projection', () => { @Component({ selector: 'fallback', - standalone: true, template: 'Fallback', }) class Fallback { @@ -2002,13 +1973,11 @@ describe('projection', () => { @Component({ selector: 'projection', template: ``, - standalone: true, imports: [Fallback], }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: `Hello`, }) @@ -2026,12 +1995,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Fallback`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` Content @@ -2054,12 +2021,10 @@ describe('projection', () => { @Component({ selector: 'projection', template: `Fallback`, - standalone: true, }) class Projection {} @Component({ - standalone: true, imports: [Projection], template: ` diff --git a/packages/core/test/acceptance/control_flow_for_spec.ts b/packages/core/test/acceptance/control_flow_for_spec.ts index 1b8336fefac..81e5d71e379 100644 --- a/packages/core/test/acceptance/control_flow_for_spec.ts +++ b/packages/core/test/acceptance/control_flow_for_spec.ts @@ -129,7 +129,7 @@ describe('control flow - for', () => { }); it('should be able to use pipes injecting ChangeDetectorRef in for loop blocks', () => { - @Pipe({name: 'test', standalone: true}) + @Pipe({name: 'test'}) class TestPipe implements PipeTransform { changeDetectorRef = inject(ChangeDetectorRef); @@ -141,7 +141,6 @@ describe('control flow - for', () => { @Component({ template: '@for (item of items | test; track item;) {{{item}}|}', imports: [TestPipe], - standalone: true, }) class TestComponent { items = [1, 2, 3]; @@ -156,7 +155,6 @@ describe('control flow - for', () => { @Directive({ selector: '[dir]', exportAs: 'dir', - standalone: true, }) class Dir { data = [1]; @@ -168,7 +166,6 @@ describe('control flow - for', () => { @Component({ selector: 'app-root', - standalone: true, imports: [Dir], template: `
@@ -589,14 +586,12 @@ describe('control flow - for', () => { ]; @Component({ - standalone: true, template: ``, selector: 'child-cmp', }) class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: ` @for(task of tasks; track task.id) { @@ -622,14 +617,12 @@ describe('control flow - for', () => { describe('content projection', () => { it('should project an @for with a single root node into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -649,14 +642,12 @@ describe('control flow - for', () => { it('should project an @empty block with a single root node into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) {} @empty { @@ -676,7 +667,6 @@ describe('control flow - for', () => { it('should allow @for and @empty blocks to be projected into different slots', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Loop slot: Empty slot: ', @@ -684,7 +674,6 @@ describe('control flow - for', () => { class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -714,14 +703,12 @@ describe('control flow - for', () => { it('should project an @for with multiple root nodes into the catch-all slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -743,7 +730,7 @@ describe('control flow - for', () => { it('should project an @for with a single root node with a data binding', () => { let directiveCount = 0; - @Directive({standalone: true, selector: '[foo]'}) + @Directive({selector: '[foo]'}) class Foo { @Input('foo') value: any; @@ -753,14 +740,12 @@ describe('control flow - for', () => { } @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent, Foo], template: ` Before @for (item of items; track $index) { @@ -781,14 +766,12 @@ describe('control flow - for', () => { it('should project an @for with an ng-container root node', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -813,14 +796,12 @@ describe('control flow - for', () => { // This test is to ensure that we don't regress if it happens in the future. it('should project an @for with single root node and comments into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -842,14 +823,12 @@ describe('control flow - for', () => { it('should project the root node when preserveWhitespaces is enabled and there are no whitespace nodes', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], preserveWhitespaces: true, // Note the whitespace due to the indentation inside @for. @@ -867,14 +846,12 @@ describe('control flow - for', () => { it('should not project the root node when preserveWhitespaces is enabled and there are whitespace nodes', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], preserveWhitespaces: true, // Note the whitespace due to the indentation inside @for. @@ -895,14 +872,12 @@ describe('control flow - for', () => { it('should not project the root node across multiple layers of @for', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { @@ -923,14 +898,12 @@ describe('control flow - for', () => { it('should project an @for with a single root template node into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent, NgIf], template: `Before @for (item of items; track $index) { {{item}} @@ -953,7 +926,6 @@ describe('control flow - for', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -961,7 +933,6 @@ describe('control flow - for', () => { @Directive({ selector: '[foo]', - standalone: true, }) class FooDirective { constructor() { @@ -970,7 +941,6 @@ describe('control flow - for', () => { } @Component({ - standalone: true, imports: [TestComponent, FooDirective], template: `Before @for (item of items; track $index) { {{item}} @@ -992,7 +962,6 @@ describe('control flow - for', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -1000,7 +969,6 @@ describe('control flow - for', () => { @Directive({ selector: '[templateDir]', - standalone: true, }) class TemplateDirective implements OnInit { constructor( @@ -1017,7 +985,6 @@ describe('control flow - for', () => { } @Component({ - standalone: true, imports: [TestComponent, TemplateDirective], template: `Before @for (item of items; track $index) { {{item}} @@ -1039,7 +1006,6 @@ describe('control flow - for', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -1047,7 +1013,6 @@ describe('control flow - for', () => { @Directive({ selector: '[templateDir]', - standalone: true, }) class TemplateDirective implements OnInit { constructor( @@ -1064,7 +1029,6 @@ describe('control flow - for', () => { } @Component({ - standalone: true, imports: [TestComponent, TemplateDirective], template: `Before @for (item of items; track $index) { {{item}} @@ -1108,14 +1072,12 @@ describe('control flow - for', () => { it('should project an @for with a single root node and @let declarations into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @for (item of items; track $index) { diff --git a/packages/core/test/acceptance/control_flow_if_spec.ts b/packages/core/test/acceptance/control_flow_if_spec.ts index 3541023dbe1..66a1c5882bb 100644 --- a/packages/core/test/acceptance/control_flow_if_spec.ts +++ b/packages/core/test/acceptance/control_flow_if_spec.ts @@ -22,7 +22,7 @@ import { import {TestBed} from '@angular/core/testing'; // Basic shared pipe used during testing. -@Pipe({name: 'multiply', pure: true, standalone: true}) +@Pipe({name: 'multiply', pure: true}) class MultiplyPipe implements PipeTransform { transform(value: number, amount: number) { return value * amount; @@ -31,7 +31,7 @@ class MultiplyPipe implements PipeTransform { describe('control flow - if', () => { it('should add and remove views based on conditions change', () => { - @Component({standalone: true, template: '@if (show) {Something} @else {Nothing}'}) + @Component({template: '@if (show) {Something} @else {Nothing}'}) class TestComponent { show = true; } @@ -48,7 +48,6 @@ describe('control flow - if', () => { it('should expose expression value in context', () => { @Component({ - standalone: true, template: '@if (show; as alias) {{{show}} aliased to {{alias}}}', }) class TestComponent { @@ -66,7 +65,6 @@ describe('control flow - if', () => { it('should not expose the aliased expression to `if` and `else if` blocks', () => { @Component({ - standalone: true, template: ` @if (value === 1; as alias) { If: {{value}} as {{alias || 'unavailable'}} @@ -96,7 +94,6 @@ describe('control flow - if', () => { it('should expose the context to nested conditional blocks', () => { @Component({ - standalone: true, imports: [MultiplyPipe], template: ` @if (value | multiply:2; as root) { @@ -135,7 +132,6 @@ describe('control flow - if', () => { let logs: any[] = []; @Component({ - standalone: true, imports: [MultiplyPipe], template: ` @if (value | multiply:2; as root) { @@ -186,7 +182,6 @@ describe('control flow - if', () => { it('should expose expression value passed through a pipe in context', () => { @Component({ - standalone: true, template: '@if (value | multiply:2; as alias) {{{value}} aliased to {{alias}}}', imports: [MultiplyPipe], }) @@ -205,7 +200,6 @@ describe('control flow - if', () => { it('should destroy all views if there is nothing to display', () => { @Component({ - standalone: true, template: '@if (show) {Something}', }) class TestComponent { @@ -223,7 +217,6 @@ describe('control flow - if', () => { it('should be able to use pipes in conditional expressions', () => { @Component({ - standalone: true, imports: [MultiplyPipe], template: ` @if ((value | multiply:2) === 2) { @@ -254,7 +247,7 @@ describe('control flow - if', () => { }); it('should be able to use pipes injecting ChangeDetectorRef in if blocks', () => { - @Pipe({name: 'test', standalone: true}) + @Pipe({name: 'test'}) class TestPipe implements PipeTransform { changeDetectorRef = inject(ChangeDetectorRef); @@ -264,7 +257,6 @@ describe('control flow - if', () => { } @Component({ - standalone: true, template: '@if (show | test) {Something}', imports: [TestPipe], }) @@ -279,7 +271,6 @@ describe('control flow - if', () => { it('should support a condition with the a typeof expression', () => { @Component({ - standalone: true, template: ` @if (typeof value === 'string') { {{value.length}} @@ -304,14 +295,12 @@ describe('control flow - if', () => { describe('content projection', () => { it('should project an @if with a single root node into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { @@ -330,7 +319,7 @@ describe('control flow - if', () => { it('should project an @if with a single root node with a data binding', () => { let directiveCount = 0; - @Directive({standalone: true, selector: '[foo]'}) + @Directive({selector: '[foo]'}) class Foo { @Input('foo') value: any; @@ -340,14 +329,12 @@ describe('control flow - if', () => { } @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent, Foo], template: ` Before @if (true) { @@ -368,14 +355,12 @@ describe('control flow - if', () => { it('should project an @if with multiple root nodes into the catch-all slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { @@ -394,14 +379,12 @@ describe('control flow - if', () => { it('should project an @if with an ng-container root node', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { @@ -424,14 +407,12 @@ describe('control flow - if', () => { // This test is to ensure that we don't regress if it happens in the future. it('should project an @if with a single root node and comments into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { @@ -451,7 +432,6 @@ describe('control flow - if', () => { it('should project @if an @else content into separate slots', () => { @Component({ - standalone: true, selector: 'test', template: 'if: (), else: ()', @@ -459,7 +439,6 @@ describe('control flow - if', () => { class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` @@ -490,14 +469,12 @@ describe('control flow - if', () => { it('should project @if an @else content into separate slots when if has default content', () => { @Component({ - standalone: true, selector: 'test', template: 'if: (), else: ()', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` @@ -528,14 +505,12 @@ describe('control flow - if', () => { it('should project @if an @else content into separate slots when else has default content', () => { @Component({ - standalone: true, selector: 'test', template: 'if: (), else: ()', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` @@ -566,14 +541,12 @@ describe('control flow - if', () => { it('should project the root node when preserveWhitespaces is enabled and there are no whitespace nodes', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], preserveWhitespaces: true, template: 'Before @if (true) {one} After', @@ -587,14 +560,12 @@ describe('control flow - if', () => { it('should not project the root node when preserveWhitespaces is enabled and there are whitespace nodes', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], preserveWhitespaces: true, // Note the whitespace due to the indentation inside @if. @@ -613,14 +584,12 @@ describe('control flow - if', () => { it('should not project the root node across multiple layers of @if', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { @@ -639,14 +608,12 @@ describe('control flow - if', () => { it('should project an @if with a single root template node into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent, NgFor], template: `Before @if (true) { {{item}} @@ -669,7 +636,6 @@ describe('control flow - if', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -677,7 +643,6 @@ describe('control flow - if', () => { @Directive({ selector: '[foo]', - standalone: true, }) class FooDirective { constructor() { @@ -686,7 +651,6 @@ describe('control flow - if', () => { } @Component({ - standalone: true, imports: [TestComponent, FooDirective], template: `Before @if (true) { foo @@ -706,7 +670,6 @@ describe('control flow - if', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -714,7 +677,6 @@ describe('control flow - if', () => { @Directive({ selector: '[templateDir]', - standalone: true, }) class TemplateDirective implements OnInit { constructor( @@ -731,7 +693,6 @@ describe('control flow - if', () => { } @Component({ - standalone: true, imports: [TestComponent, TemplateDirective], template: `Before @if (true) { foo @@ -751,7 +712,6 @@ describe('control flow - if', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -759,7 +719,6 @@ describe('control flow - if', () => { @Directive({ selector: '[templateDir]', - standalone: true, }) class TemplateDirective implements OnInit { constructor( @@ -776,7 +735,6 @@ describe('control flow - if', () => { } @Component({ - standalone: true, imports: [TestComponent, TemplateDirective], template: `Before @if (true) { foo @@ -796,7 +754,6 @@ describe('control flow - if', () => { let directiveCount = 0; @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) @@ -804,7 +761,6 @@ describe('control flow - if', () => { @Directive({ selector: '.foo', - standalone: true, }) class TemplateDirective { constructor() { @@ -813,7 +769,6 @@ describe('control flow - if', () => { } @Component({ - standalone: true, imports: [TestComponent, TemplateDirective], template: `Before @if (condition) {
foo
@@ -861,14 +816,12 @@ describe('control flow - if', () => { it('should project an @if with a single root node and @let declarations into the root node slot', () => { @Component({ - standalone: true, selector: 'test', template: 'Main: Slot: ', }) class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` Before @if (true) { diff --git a/packages/core/test/acceptance/control_flow_switch_spec.ts b/packages/core/test/acceptance/control_flow_switch_spec.ts index c70d3c3e90c..a9a0ca4d28b 100644 --- a/packages/core/test/acceptance/control_flow_switch_spec.ts +++ b/packages/core/test/acceptance/control_flow_switch_spec.ts @@ -10,7 +10,7 @@ import {ChangeDetectorRef, Component, inject, Pipe, PipeTransform} from '@angula import {TestBed} from '@angular/core/testing'; // Basic shared pipe used during testing. -@Pipe({name: 'multiply', pure: true, standalone: true}) +@Pipe({name: 'multiply', pure: true}) class MultiplyPipe implements PipeTransform { transform(value: number, amount: number) { return value * amount; @@ -20,7 +20,6 @@ class MultiplyPipe implements PipeTransform { describe('control flow - switch', () => { it('should show a template based on a matching case', () => { @Component({ - standalone: true, template: ` @switch (case) { @case (0) {case 0} @@ -49,7 +48,6 @@ describe('control flow - switch', () => { it('should be able to use a pipe in the switch expression', () => { @Component({ - standalone: true, imports: [MultiplyPipe], template: ` @switch (case | multiply:2) { @@ -79,7 +77,6 @@ describe('control flow - switch', () => { it('should be able to use a pipe in the case expression', () => { @Component({ - standalone: true, imports: [MultiplyPipe], template: ` @switch (case) { @@ -108,7 +105,7 @@ describe('control flow - switch', () => { }); it('should be able to use pipes injecting ChangeDetectorRef in switch blocks', () => { - @Pipe({name: 'test', standalone: true}) + @Pipe({name: 'test'}) class TestPipe implements PipeTransform { changeDetectorRef = inject(ChangeDetectorRef); @@ -118,7 +115,6 @@ describe('control flow - switch', () => { } @Component({ - standalone: true, template: ` @switch (case | test) { @case (0 | test) {Zero} @@ -138,7 +134,6 @@ describe('control flow - switch', () => { it('should project @switch cases into appropriate slots when selectors are used for all cases', () => { @Component({ - standalone: true, selector: 'test', template: 'case 1: (), case 2: (), case 3: ()', @@ -146,7 +141,6 @@ describe('control flow - switch', () => { class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` @@ -183,7 +177,6 @@ describe('control flow - switch', () => { it('should project @switch cases into appropriate slots when selectors are used for some cases', () => { @Component({ - standalone: true, selector: 'test', template: 'case 1: (), case 2: (), case 3: ()', @@ -191,7 +184,6 @@ describe('control flow - switch', () => { class TestComponent {} @Component({ - standalone: true, imports: [TestComponent], template: ` diff --git a/packages/core/test/acceptance/csp_spec.ts b/packages/core/test/acceptance/csp_spec.ts index 2ef31dbef9c..5338ead5ef4 100644 --- a/packages/core/test/acceptance/csp_spec.ts +++ b/packages/core/test/acceptance/csp_spec.ts @@ -45,14 +45,12 @@ describe('CSP integration', () => { selector: 'uses-styles', template: '', styles: [testStyles], - standalone: true, encapsulation: ViewEncapsulation.Emulated, }) class UsesStyles {} @Component({ selector: 'app', - standalone: true, template: '', imports: [UsesStyles], }) @@ -73,14 +71,12 @@ describe('CSP integration', () => { selector: 'uses-styles', template: '', styles: [testStyles], - standalone: true, encapsulation: ViewEncapsulation.None, }) class UsesStyles {} @Component({ selector: 'app', - standalone: true, template: '', imports: [UsesStyles], }) @@ -107,7 +103,6 @@ describe('CSP integration', () => { selector: 'uses-styles', template: '', styles: [testStyles], - standalone: true, encapsulation: ViewEncapsulation.ShadowDom, }) class UsesStyles { @@ -118,7 +113,6 @@ describe('CSP integration', () => { @Component({ selector: 'app', - standalone: true, template: '', imports: [UsesStyles], }) @@ -135,12 +129,11 @@ describe('CSP integration', () => { it( 'should prefer nonce provided through DI over one provided in the DOM', withBody('', async () => { - @Component({selector: 'uses-styles', template: '', styles: [testStyles], standalone: true}) + @Component({selector: 'uses-styles', template: '', styles: [testStyles]}) class UsesStyles {} @Component({ selector: 'app', - standalone: true, template: '', imports: [UsesStyles], }) diff --git a/packages/core/test/acceptance/defer_spec.ts b/packages/core/test/acceptance/defer_spec.ts index ac1f0ec5a65..1992b7e2ae5 100644 --- a/packages/core/test/acceptance/defer_spec.ts +++ b/packages/core/test/acceptance/defer_spec.ts @@ -137,7 +137,6 @@ async function verifyTimeline( function createFixture(template: string) { @Component({ selector: 'nested-cmp', - standalone: true, template: '{{ block }}', }) class NestedCmp { @@ -145,7 +144,6 @@ function createFixture(template: string) { } @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template, @@ -203,13 +201,11 @@ describe('@defer', () => { it('should transition between placeholder, loading and loaded states', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, template: 'Hi!', }) class MyLazyCmp {} @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp], template: ` @@ -248,13 +244,11 @@ describe('@defer', () => { it('should work when only main block is present', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, template: 'Hi!', }) class MyLazyCmp {} @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp], template: ` @@ -284,7 +278,7 @@ describe('@defer', () => { }); it('should be able to use pipes injecting ChangeDetectorRef in defer blocks', async () => { - @Pipe({name: 'test', standalone: true}) + @Pipe({name: 'test'}) class TestPipe implements PipeTransform { changeDetectorRef = inject(ChangeDetectorRef); @@ -294,7 +288,6 @@ describe('@defer', () => { } @Component({ - standalone: true, imports: [TestPipe], template: `@defer (when isVisible | test; prefetch when isVisible | test) {Hello}`, }) @@ -323,7 +316,6 @@ describe('@defer', () => { // code is wrapped using the `@defer` block. const logs: string[] = []; @Directive({ - standalone: true, selector: '[dirA]', }) class DirA { @@ -333,7 +325,6 @@ describe('@defer', () => { } @Directive({ - standalone: true, selector: '[dirB]', }) class DirB { @@ -343,7 +334,6 @@ describe('@defer', () => { } @Directive({ - standalone: true, selector: '[dirC]', }) class DirC { @@ -353,7 +343,6 @@ describe('@defer', () => { } @Component({ - standalone: true, // Directive order is intentional here (different from the order // in which they are defined on the host element). imports: [DirC, DirB, DirA], @@ -387,7 +376,6 @@ describe('@defer', () => { it('should render when @defer is used inside of an OnPush component', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, template: '{{ foo }}', }) class MyLazyCmp { @@ -395,7 +383,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp], changeDetection: ChangeDetectionStrategy.OnPush, @@ -420,7 +407,6 @@ describe('@defer', () => { it('should render when @defer-loaded component uses OnPush', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: '{{ foo }}', }) @@ -429,7 +415,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp], template: ` @@ -453,7 +438,6 @@ describe('@defer', () => { it('should render when both @defer-loaded and host component use OnPush', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: '{{ foo }}', }) @@ -462,7 +446,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp], changeDetection: ChangeDetectionStrategy.OnPush, @@ -487,7 +470,6 @@ describe('@defer', () => { it('should render when both OnPush components used in other blocks (e.g. @placeholder)', async () => { @Component({ selector: 'my-lazy-cmp', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: '{{ foo }}', }) @@ -497,7 +479,6 @@ describe('@defer', () => { @Component({ selector: 'another-lazy-cmp', - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: '{{ foo }}', }) @@ -506,7 +487,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [MyLazyCmp, AnotherLazyCmp], changeDetection: ChangeDetectionStrategy.OnPush, @@ -550,7 +530,6 @@ describe('@defer', () => { it('should support `on immediate` condition', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -558,7 +537,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -623,7 +601,6 @@ describe('@defer', () => { it('should support directive matching in all blocks', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -631,7 +608,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template: ` @@ -822,7 +798,6 @@ describe('@defer', () => { it('should render an error block when loading fails', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -830,7 +805,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template: ` @@ -889,13 +863,11 @@ describe('@defer', () => { it('should report an error to the ErrorHandler if no `@error` block is defined', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'NestedCmp', }) class NestedCmp {} @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template: ` @@ -959,7 +931,6 @@ describe('@defer', () => { it('should not render `@error` block if loaded component has errors', async () => { @Component({ selector: 'cmp-with-error', - standalone: true, template: 'CmpWithError', }) class CmpWithError { @@ -969,7 +940,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [CmpWithError], template: ` @@ -1045,7 +1015,6 @@ describe('@defer', () => { it(`should log an error in the handler when there is no error block with devMode:${devMode}`, async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1053,7 +1022,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template: ` @@ -1126,7 +1094,6 @@ describe('@defer', () => { it('should query for components within each block', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1134,7 +1101,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'simple-app', imports: [NestedCmp], template: ` @@ -1192,21 +1158,18 @@ describe('@defer', () => { it('should be able to project content into each block', async () => { @Component({ selector: 'cmp-a', - standalone: true, template: 'CmpA', }) class CmpA {} @Component({ selector: 'cmp-b', - standalone: true, template: 'CmpB', }) class CmpB {} @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1214,7 +1177,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'my-app', imports: [NestedCmp], template: ` @@ -1238,7 +1200,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [MyCmp, CmpA, CmpB], template: ` @@ -1303,14 +1264,12 @@ describe('@defer', () => { it('should be able to have nested blocks', async () => { @Component({ selector: 'cmp-a', - standalone: true, template: 'CmpA', }) class CmpA {} @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1318,7 +1277,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp, CmpA], template: ` @@ -1377,13 +1335,11 @@ describe('@defer', () => { it('should handle nested blocks that defer load the same dep', async () => { @Component({ selector: 'cmp-a', - standalone: true, template: 'CmpA', }) class CmpA {} @Component({ - standalone: true, selector: 'root-app', imports: [CmpA], template: ` @@ -1495,7 +1451,6 @@ describe('@defer', () => { it('should be able to prefetch resources', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1503,7 +1458,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1576,7 +1530,6 @@ describe('@defer', () => { it('should handle a case when prefetching fails', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1584,7 +1537,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1656,7 +1608,6 @@ describe('@defer', () => { it('should work when loading and prefetching were kicked off at the same time', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1664,7 +1615,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1724,7 +1674,6 @@ describe('@defer', () => { it('should support `prefetch on idle` condition', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1732,7 +1681,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1801,7 +1749,6 @@ describe('@defer', () => { it('should trigger prefetching based on `on idle` only once', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1809,7 +1756,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1882,7 +1828,6 @@ describe('@defer', () => { it('should trigger fetching based on `on idle` only once', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1890,7 +1835,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -1952,7 +1896,6 @@ describe('@defer', () => { it('should support `prefetch on immediate` condition', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -1960,7 +1903,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -2031,7 +1973,6 @@ describe('@defer', () => { it('should delay nested defer blocks with `on idle` triggers', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Primary block content.', }) class NestedCmp { @@ -2040,13 +1981,11 @@ describe('@defer', () => { @Component({ selector: 'another-nested-cmp', - standalone: true, template: 'Nested block component.', }) class AnotherNestedCmp {} @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp, AnotherNestedCmp], template: ` @@ -2129,7 +2068,6 @@ describe('@defer', () => { it('should not request idle callback for each block in a for loop', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -2137,7 +2075,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -2200,7 +2137,6 @@ describe('@defer', () => { it('should delay nested defer blocks with `on idle` triggers', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Primary block content.', }) class NestedCmp { @@ -2209,13 +2145,11 @@ describe('@defer', () => { @Component({ selector: 'another-nested-cmp', - standalone: true, template: 'Nested block component.', }) class AnotherNestedCmp {} @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp, AnotherNestedCmp], template: ` @@ -2296,7 +2230,6 @@ describe('@defer', () => { it('should clear idle handlers when defer block is triggered', async () => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isVisible; on idle; prefetch on idle) { @@ -2339,7 +2272,6 @@ describe('@defer', () => { describe('trigger resolution', () => { it('should resolve a trigger is outside the defer block', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2369,11 +2301,10 @@ describe('@defer', () => { })); it('should resolve a trigger on a component outside the defer block', fakeAsync(() => { - @Component({selector: 'some-comp', template: '', standalone: true}) + @Component({selector: 'some-comp', template: ''}) class SomeComp {} @Component({ - standalone: true, imports: [SomeComp], template: ` @defer (on interaction(trigger)) { @@ -2405,7 +2336,6 @@ describe('@defer', () => { it('should resolve a trigger that is on a parent element', fakeAsync(() => { @Component({ - standalone: true, template: ` @@ -2466,11 +2395,10 @@ describe('@defer', () => { })); it('should resolve a trigger that is on a component in a parent embedded view', fakeAsync(() => { - @Component({selector: 'some-comp', template: '', standalone: true}) + @Component({selector: 'some-comp', template: ''}) class SomeComp {} @Component({ - standalone: true, imports: [SomeComp], template: ` @if (cond) { @@ -2504,7 +2432,6 @@ describe('@defer', () => { it('should resolve a trigger that is inside the placeholder', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2526,11 +2453,10 @@ describe('@defer', () => { })); it('should resolve a trigger that is a component inside the placeholder', fakeAsync(() => { - @Component({selector: 'some-comp', template: '', standalone: true}) + @Component({selector: 'some-comp', template: ''}) class SomeComp {} @Component({ - standalone: true, imports: [SomeComp], template: ` @defer (on interaction(trigger)) { @@ -2556,7 +2482,6 @@ describe('@defer', () => { describe('interaction triggers', () => { it('should load the deferred content when the trigger is clicked', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2586,7 +2511,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2612,7 +2536,6 @@ describe('@defer', () => { it('should load the deferred content when an implicit trigger is clicked', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction) { Main content @@ -2636,7 +2559,6 @@ describe('@defer', () => { it('should load the deferred content if a child of the trigger is clicked', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2665,7 +2587,6 @@ describe('@defer', () => { it('should support multiple deferred blocks with the same trigger', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content 1 @@ -2696,7 +2617,6 @@ describe('@defer', () => { it('should unbind the trigger events when the deferred block is loaded', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) {Main content} @@ -2721,7 +2641,6 @@ describe('@defer', () => { it('should unbind the trigger events when the trigger is destroyed', fakeAsync(() => { @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on interaction(trigger)) {Main content} @@ -2749,7 +2668,6 @@ describe('@defer', () => { it('should unbind the trigger events when the deferred block is destroyed', fakeAsync(() => { @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on interaction(trigger)) {Main content} @@ -2778,7 +2696,6 @@ describe('@defer', () => { it('should remove placeholder content on interaction', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on interaction(trigger)) { Main content @@ -2811,7 +2728,6 @@ describe('@defer', () => { it('should prefetch resources on interaction', fakeAsync(() => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on interaction(trigger)) {Main content} @@ -2855,7 +2771,6 @@ describe('@defer', () => { it('should prefetch resources on interaction with an implicit trigger', fakeAsync(() => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on interaction) { @@ -2909,7 +2824,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @defer (on hover(trigger)) { Main content @@ -2940,7 +2854,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @defer (on hover) { Main content @@ -2970,7 +2883,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @defer (on hover(trigger)) { Main content 1 @@ -3007,7 +2919,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @defer (on hover(trigger)) { Main content @@ -3040,7 +2951,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on hover(trigger)) { @@ -3076,7 +2986,6 @@ describe('@defer', () => { } @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on hover(trigger)) { @@ -3113,7 +3022,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on hover(trigger)) { @@ -3165,7 +3073,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on hover) { @@ -3216,7 +3123,6 @@ describe('@defer', () => { it('should trigger based on `on timer` condition', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -3224,7 +3130,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -3292,7 +3197,6 @@ describe('@defer', () => { it('should trigger nested `on timer` condition', async () => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (on timer(100ms)) { @@ -3339,7 +3243,6 @@ describe('@defer', () => { it('should trigger prefetching based on `on timer` condition', async () => { @Component({ selector: 'nested-cmp', - standalone: true, template: 'Rendering {{ block }} block.', }) class NestedCmp { @@ -3347,7 +3250,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'root-app', imports: [NestedCmp], template: ` @@ -3428,7 +3330,6 @@ describe('@defer', () => { const clearSpy = spyOn(globalThis, 'clearTimeout'); @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isVisible; on timer(200ms); prefetch on timer(100ms)) { @@ -3554,7 +3455,6 @@ describe('@defer', () => { it('should load the deferred content when the trigger is in the viewport', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport(trigger)) { Main content @@ -3581,7 +3481,6 @@ describe('@defer', () => { it('should load the deferred content when an implicit trigger is in the viewport', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport) { Main content @@ -3607,7 +3506,6 @@ describe('@defer', () => { it('should not load the content if the trigger is not in the view yet', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport(trigger)) { Main content @@ -3645,7 +3543,6 @@ describe('@defer', () => { it('should support multiple deferred blocks with the same trigger', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport(trigger)) { Main content 1 @@ -3677,7 +3574,6 @@ describe('@defer', () => { it('should stop observing the trigger when the deferred block is loaded', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport(trigger)) { Main content @@ -3705,7 +3601,6 @@ describe('@defer', () => { it('should stop observing the trigger when the trigger is destroyed', fakeAsync(() => { @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on viewport(trigger)) { @@ -3736,7 +3631,6 @@ describe('@defer', () => { it('should stop observing the trigger when the deferred block is destroyed', fakeAsync(() => { @Component({ - standalone: true, template: ` @if (renderBlock) { @defer (on viewport(trigger)) { @@ -3768,7 +3662,6 @@ describe('@defer', () => { it('should disconnect the intersection observer once all deferred blocks have been loaded', fakeAsync(() => { @Component({ - standalone: true, template: ` @defer (on viewport(triggerOne)) { @@ -3808,7 +3701,6 @@ describe('@defer', () => { it('should prefetch resources when the trigger comes into the viewport', fakeAsync(() => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on viewport(trigger)) { @@ -3855,7 +3747,6 @@ describe('@defer', () => { it('should prefetch resources when an implicit trigger comes into the viewport', fakeAsync(() => { @Component({ - standalone: true, selector: 'root-app', template: ` @defer (when isLoaded; prefetch on viewport) { @@ -3903,7 +3794,6 @@ describe('@defer', () => { it('should load deferred content in a loop', fakeAsync(() => { @Component({ - standalone: true, template: ` @for (item of items; track item) { @defer (on viewport) {d{{item}} } @@ -3944,7 +3834,6 @@ describe('@defer', () => { describe('DOM-based events cleanup', () => { it('should unbind `interaction` trigger events when the deferred block is loaded', async () => { @Component({ - standalone: true, template: ` @defer ( when isVisible; @@ -3994,7 +3883,6 @@ describe('@defer', () => { it('should unbind `hover` trigger events when the deferred block is loaded', async () => { @Component({ - standalone: true, template: ` @defer ( when isVisible; @@ -4067,7 +3955,6 @@ describe('@defer', () => { const TokenB = new InjectionToken('B'); @Component({ - standalone: true, selector: 'parent-cmp', template: '', providers: [{provide: TokenA, useValue: 'TokenA.ParentCmp'}], @@ -4075,7 +3962,6 @@ describe('@defer', () => { class ParentCmp {} @Component({ - standalone: true, selector: 'child-cmp', template: 'Token A: {{ parentTokenA }} | Token B: {{ parentTokenB }}', }) @@ -4085,7 +3971,6 @@ describe('@defer', () => { } @Component({ - standalone: true, selector: 'app-root', template: ` @@ -4145,7 +4030,6 @@ describe('@defer', () => { @Component({ selector: 'lazy', - standalone: true, imports: [MyModule], template: ` Lazy Component! Token: {{ token }} @@ -4156,7 +4040,6 @@ describe('@defer', () => { } @Component({ - standalone: true, imports: [Lazy], template: ` @defer (on immediate) { @@ -4167,7 +4050,6 @@ describe('@defer', () => { class Dialog {} @Component({ - standalone: true, selector: 'app-root', providers: [{provide: TokenA, useValue: 'TokenA from RootCmp'}], template: ` @@ -4260,14 +4142,12 @@ describe('@defer', () => { @Component({ selector: 'chart-collection', template: '', - standalone: true, imports: [ChartsModule], }) class ChartCollectionComponent {} @Component({ selector: 'app-root', - standalone: true, template: ` @for(item of items; track $index) { @defer (when isVisible) { @@ -4336,14 +4216,12 @@ describe('@defer', () => { class MyModuleA {} @Component({ - standalone: true, imports: [RouterOutlet], template: '', }) class App {} @Component({ - standalone: true, selector: 'another-child', imports: [CommonModule, MyModuleA], template: 'another child: {{route.snapshot.url[0]}} | token: {{tokenA}}', @@ -4357,7 +4235,6 @@ describe('@defer', () => { } @Component({ - standalone: true, imports: [CommonModule, AnotherChild], template: ` child: {{route.snapshot.url[0]}} | diff --git a/packages/core/test/acceptance/destroy_ref_spec.ts b/packages/core/test/acceptance/destroy_ref_spec.ts index 872b4db4d67..83b363ce8d8 100644 --- a/packages/core/test/acceptance/destroy_ref_spec.ts +++ b/packages/core/test/acceptance/destroy_ref_spec.ts @@ -82,7 +82,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, template: ``, }) class TestCmp { @@ -103,7 +102,6 @@ describe('DestroyRef', () => { @Directive({ selector: '[withCleanup]', - standalone: true, }) class WithCleanupDirective { constructor() { @@ -113,7 +111,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, imports: [WithCleanupDirective], // note: we are trying to register a LView-level cleanup _before_ TView-level one (event // listener) @@ -136,7 +133,6 @@ describe('DestroyRef', () => { @Directive({ selector: '[withCleanup]', - standalone: true, }) class WithCleanupDirective { constructor() { @@ -146,7 +142,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, imports: [WithCleanupDirective, NgIf], template: `
`, }) @@ -167,7 +162,6 @@ describe('DestroyRef', () => { const onDestroySpy = jasmine.createSpy('destroy spy'); @Component({ selector: 'child', - standalone: true, template: '', }) class Child { @@ -176,7 +170,6 @@ describe('DestroyRef', () => { } } @Component({ - standalone: true, imports: [Child, NgIf], template: '', }) @@ -197,7 +190,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, template: ``, }) class TestCmp { @@ -223,7 +215,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, template: ``, }) class TestCmp { @@ -251,7 +242,6 @@ describe('DestroyRef', () => { it('should throw when trying to register destroy callback on destroyed LView', () => { @Component({ selector: 'test', - standalone: true, template: ``, }) class TestCmp { @@ -272,7 +262,6 @@ describe('DestroyRef', () => { @Component({ selector: 'test', - standalone: true, template: ``, }) class TestCmp { diff --git a/packages/core/test/acceptance/di_spec.ts b/packages/core/test/acceptance/di_spec.ts index 2a837a7075d..5ef849a7722 100644 --- a/packages/core/test/acceptance/di_spec.ts +++ b/packages/core/test/acceptance/di_spec.ts @@ -309,7 +309,6 @@ describe('importProvidersFrom', () => { class ModuleA {} @Component({ - standalone: true, template: '', imports: [ModuleA], }) @@ -3924,7 +3923,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, selector: 'test-cmp', template: '{{value}}', providers: [{provide: TOKEN, useValue: 'injected value'}], @@ -3953,7 +3951,6 @@ describe('di', () => { } @Component({ - standalone: true, selector: 'test-cmp', template: '{{service.value}}', providers: [Service, {provide: TOKEN, useValue: 'injected value'}], @@ -3971,7 +3968,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, selector: 'test-cmp', template: '{{value}}', }) @@ -4048,7 +4044,6 @@ describe('di', () => { } @Component({ - standalone: true, selector: 'test-cmp', template: '{{service.value}}', providers: [{provide: TOKEN, useValue: 'injected value'}], @@ -4074,7 +4069,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4090,7 +4084,6 @@ describe('di', () => { factory: () => 'from root', }); @Component({ - standalone: true, template: '', providers: [{provide: TOKEN, useValue: 'from component'}], }) @@ -4108,7 +4101,6 @@ describe('di', () => { }); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4122,7 +4114,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, selector: 'child', template: '{{value}}', }) @@ -4131,7 +4122,6 @@ describe('di', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', providers: [{provide: TOKEN, useValue: 'from parent'}], @@ -4151,7 +4141,6 @@ describe('di', () => { }); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4171,7 +4160,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4192,7 +4180,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4227,7 +4214,6 @@ describe('di', () => { factory: () => 'from root', }); @Component({ - standalone: true, template: '', providers: [{provide: TOKEN, useValue: 'from component'}], }) @@ -4257,7 +4243,6 @@ describe('di', () => { }); @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4282,7 +4267,6 @@ describe('di', () => { const TOKEN = new InjectionToken('TOKEN'); @Component({ - standalone: true, selector: 'child', template: '{{ a }}|{{ b }}', }) @@ -4293,7 +4277,6 @@ describe('di', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', providers: [{provide: TOKEN, useValue: 'from parent'}], @@ -4364,7 +4347,6 @@ describe('di', () => { }); @Component({ - standalone: true, template: '', providers: [{provide: TOKEN, useValue: 'from component'}], }) @@ -4389,7 +4371,6 @@ describe('di', () => { it('should support node injectors', () => { @Component({ - standalone: true, template: '', }) class TestCmp { @@ -4905,13 +4886,12 @@ describe('di', () => { describe('HostAttributeToken', () => { it('should inject an attribute on an element node', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr')); } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -4925,13 +4905,12 @@ describe('di', () => { }); it('should inject an attribute on ', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr')); } @Component({ - standalone: true, template: '', imports: [Dir], }) @@ -4945,13 +4924,12 @@ describe('di', () => { }); it('should inject an attribute on ', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr')); } @Component({ - standalone: true, template: '', imports: [Dir], }) @@ -4965,7 +4943,7 @@ describe('di', () => { }); it('should be able to inject different kinds of attributes', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { className = inject(new HostAttributeToken('class')); inlineStyles = inject(new HostAttributeToken('style')); @@ -4973,7 +4951,6 @@ describe('di', () => { } @Component({ - standalone: true, template: `
{ }); it('should throw a DI error when injecting a non-existent attribute', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr')); } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5019,13 +4995,12 @@ describe('di', () => { }); it('should not throw a DI error when injecting a non-existent attribute with optional: true', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr'), {optional: true}); } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5039,7 +5014,7 @@ describe('di', () => { }); it('should not inject attributes with namespace', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('some-attr'), {optional: true}); namespaceExists = inject(new HostAttributeToken('svg:exist'), {optional: true}); @@ -5047,7 +5022,6 @@ describe('di', () => { } @Component({ - standalone: true, template: `
`, @@ -5067,7 +5041,7 @@ describe('di', () => { }); it('should not inject attributes representing bindings and outputs', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { @Input() binding!: string; @Output() output = new EventEmitter(); @@ -5079,7 +5053,6 @@ describe('di', () => { } @Component({ - standalone: true, imports: [Dir], template: `
{ }); it('should not inject data-bound attributes', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(new HostAttributeToken('title'), {optional: true}); } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5132,13 +5104,12 @@ describe('di', () => { it('should inject an attribute using @Inject', () => { const TOKEN = new HostAttributeToken('some-attr'); - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { constructor(@Inject(TOKEN) readonly value: string) {} } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5154,13 +5125,12 @@ describe('di', () => { it('should throw when injecting a non-existent attribute using @Inject', () => { const TOKEN = new HostAttributeToken('some-attr'); - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { constructor(@Inject(TOKEN) readonly value: string) {} } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5176,13 +5146,12 @@ describe('di', () => { it('should not throw when injecting a non-existent attribute using @Inject @Optional', () => { const TOKEN = new HostAttributeToken('some-attr'); - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { constructor(@Inject(TOKEN) @Optional() readonly value: string | null) {} } @Component({ - standalone: true, template: '
', imports: [Dir], }) @@ -5198,13 +5167,12 @@ describe('di', () => { describe('HOST_TAG_NAME', () => { it('should inject the tag name on an element node', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(HOST_TAG_NAME); } @Component({ - standalone: true, template: `
@@ -5232,13 +5200,12 @@ describe('di', () => { }); it('should throw a DI error when injecting into non-DOM nodes', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(HOST_TAG_NAME); } @Component({ - standalone: true, template: '', imports: [Dir], }) @@ -5247,7 +5214,6 @@ describe('di', () => { } @Component({ - standalone: true, template: '', imports: [Dir], }) @@ -5265,13 +5231,12 @@ describe('di', () => { }); it('should not throw a DI error when injecting into non-DOM nodes with optional: true', () => { - @Directive({selector: '[dir]', standalone: true}) + @Directive({selector: '[dir]'}) class Dir { value = inject(HOST_TAG_NAME, {optional: true}); } @Component({ - standalone: true, template: '', imports: [Dir], }) diff --git a/packages/core/test/acceptance/directive_spec.ts b/packages/core/test/acceptance/directive_spec.ts index 12099bea8e8..8c383b7f69c 100644 --- a/packages/core/test/acceptance/directive_spec.ts +++ b/packages/core/test/acceptance/directive_spec.ts @@ -864,7 +864,7 @@ describe('directives', () => { }); it('should transform aliased inputs coming from host directives', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input({transform: (value: string) => (value ? 1 : 0)}) value = -1; } diff --git a/packages/core/test/acceptance/env_injector_standalone_spec.ts b/packages/core/test/acceptance/env_injector_standalone_spec.ts index 0924c1a05d9..3bd45e1392c 100644 --- a/packages/core/test/acceptance/env_injector_standalone_spec.ts +++ b/packages/core/test/acceptance/env_injector_standalone_spec.ts @@ -25,7 +25,7 @@ describe('environment injector and standalone components', () => { @NgModule({providers: [ModuleService]}) class Module {} - @Component({standalone: true, imports: [Module]}) + @Component({imports: [Module]}) class StandaloneComponent {} const parentEnvInjector = TestBed.inject(EnvironmentInjector); @@ -42,7 +42,7 @@ describe('environment injector and standalone components', () => { @NgModule({providers: [ModuleService]}) class Module {} - @Component({standalone: true, imports: [Module]}) + @Component({imports: [Module]}) class StandaloneComponent {} @NgModule({imports: [StandaloneComponent], exports: [StandaloneComponent]}) @@ -62,10 +62,10 @@ describe('environment injector and standalone components', () => { @NgModule({providers: [{provide: ModuleService, useClass: ModuleService, multi: true}]}) class Module {} - @Component({standalone: true, imports: [Module]}) + @Component({imports: [Module]}) class StandaloneComponent1 {} - @Component({standalone: true, imports: [Module]}) + @Component({imports: [Module]}) class StandaloneComponent2 {} @NgModule({ diff --git a/packages/core/test/acceptance/environment_injector_spec.ts b/packages/core/test/acceptance/environment_injector_spec.ts index 7a910e918fc..4f80382d185 100644 --- a/packages/core/test/acceptance/environment_injector_spec.ts +++ b/packages/core/test/acceptance/environment_injector_spec.ts @@ -233,7 +233,6 @@ describe('environment injector', () => { }); @Component({ - standalone: true, template: '', providers: [{provide: TOKEN, useValue: 'from component'}], }) diff --git a/packages/core/test/acceptance/hmr_spec.ts b/packages/core/test/acceptance/hmr_spec.ts index ce88026f1a5..6327eb66561 100644 --- a/packages/core/test/acceptance/hmr_spec.ts +++ b/packages/core/test/acceptance/hmr_spec.ts @@ -44,7 +44,6 @@ describe('hot module replacement', () => { let instance!: ChildCmp; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello {{state}}', }; @@ -58,7 +57,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -111,7 +109,6 @@ describe('hot module replacement', () => { it('should recreate multiple usages of a complex component', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'ChildCmp (orig)

{{ text }}

', }; @@ -121,7 +118,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ` Unrelated node #1 @@ -204,7 +200,6 @@ describe('hot module replacement', () => { it('should not recreate sub-classes of a component being replaced', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Base class', }; @@ -213,13 +208,11 @@ describe('hot module replacement', () => { @Component({ selector: 'child-sub-cmp', - standalone: true, template: 'Sub class', }) class ChildSubCmp extends ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp, ChildSubCmp], template: `|`, }) @@ -275,7 +268,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -313,7 +305,6 @@ describe('hot module replacement', () => { it('should continue binding inputs to a component that is replaced', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '{{staticValue}}{{dynamicValue}}', }; @@ -324,7 +315,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -397,7 +387,6 @@ describe('hot module replacement', () => { it('should recreate a component used inside @for', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello {{value}}', }; @@ -407,7 +396,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ` @for (current of items; track current.id) { @@ -482,7 +470,6 @@ describe('hot module replacement', () => { it('should be able to replace a component that injects ViewContainerRef', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello world', }; @@ -492,7 +479,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -565,7 +551,6 @@ describe('hot module replacement', () => { it('should update ViewChildren query results', async () => { @Component({ selector: 'child-cmp', - standalone: true, template: 'ChildCmp {{ text }}', }) class ChildCmp { @@ -574,7 +559,6 @@ describe('hot module replacement', () => { let instance!: ParentCmp; const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', imports: [ChildCmp], template: ` @@ -593,7 +577,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ParentCmp], template: ``, }) @@ -623,7 +606,6 @@ describe('hot module replacement', () => { it('should update ViewChild when the string points to a different element', async () => { let instance!: ParentCmp; const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', template: `
@@ -644,7 +626,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ParentCmp], template: ``, }) @@ -677,14 +658,12 @@ describe('hot module replacement', () => { const token = new InjectionToken('token'); @Directive({ - standalone: true, selector: '[dir-a]', providers: [{provide: token, useExisting: DirA}], }) class DirA {} @Directive({ - standalone: true, selector: '[dir-b]', providers: [{provide: token, useExisting: DirB}], }) @@ -692,7 +671,6 @@ describe('hot module replacement', () => { let instance!: ParentCmp; const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', imports: [DirA, DirB], template: `
`, @@ -708,7 +686,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ParentCmp], template: ``, }) @@ -735,7 +712,6 @@ describe('hot module replacement', () => { const token = new InjectionToken('token'); @Directive({ - standalone: true, selector: '[dir]', providers: [{provide: token, useExisting: Dir}], }) @@ -743,7 +719,6 @@ describe('hot module replacement', () => { let instance!: ParentCmp; const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', imports: [Dir], template: `
`, @@ -759,7 +734,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ParentCmp], template: ``, }) @@ -782,7 +756,6 @@ describe('hot module replacement', () => { describe('content projection', () => { it('should work with content projection', () => { const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', template: ``, }; @@ -791,7 +764,6 @@ describe('hot module replacement', () => { class ParentCmp {} @Component({ - standalone: true, imports: [ParentCmp], template: ` @@ -848,7 +820,6 @@ describe('hot module replacement', () => { it('should handle elements moving around into different slots', () => { // Start off with a single catch-all slot. const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', template: ``, }; @@ -857,7 +828,6 @@ describe('hot module replacement', () => { class ParentCmp {} @Component({ - standalone: true, imports: [ParentCmp], template: ` @@ -934,7 +904,6 @@ describe('hot module replacement', () => { it('should handle default content for ng-content', () => { const initialMetadata: Component = { - standalone: true, selector: 'parent-cmp', template: ` @@ -947,7 +916,6 @@ describe('hot module replacement', () => { class ParentCmp {} @Component({ - standalone: true, imports: [ParentCmp], template: ` @@ -993,7 +961,6 @@ describe('hot module replacement', () => { it('should only invoke the init/destroy hooks inside the content when replacing the template', () => { @Component({ template: '', - standalone: true, selector: 'child-cmp', }) class ChildCmp implements OnInit, OnDestroy { @@ -1009,7 +976,6 @@ describe('hot module replacement', () => { } const initialMetadata: Component = { - standalone: true, template: ` @@ -1039,7 +1005,6 @@ describe('hot module replacement', () => { `, - standalone: true, imports: [ParentCmp], }) class RootCmp {} @@ -1099,7 +1064,6 @@ describe('hot module replacement', () => { it('should invoke checked hooks both on the host and the content being replaced', () => { @Component({ template: '', - standalone: true, selector: 'child-cmp', }) class ChildCmp implements DoCheck { @@ -1111,7 +1075,6 @@ describe('hot module replacement', () => { } const initialMetadata: Component = { - standalone: true, template: ``, imports: [ChildCmp], selector: 'parent-cmp', @@ -1127,7 +1090,6 @@ describe('hot module replacement', () => { @Component({ template: ``, - standalone: true, imports: [ParentCmp], }) class RootCmp {} @@ -1187,7 +1149,6 @@ describe('hot module replacement', () => { const values: string[] = []; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1204,7 +1165,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1261,7 +1221,6 @@ describe('hot module replacement', () => { let count = 0; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1275,7 +1234,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1313,7 +1271,6 @@ describe('hot module replacement', () => { let count = 0; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1327,7 +1284,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1409,7 +1365,6 @@ describe('hot module replacement', () => { let destroyCount = 0; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1424,7 +1379,7 @@ describe('hot module replacement', () => { } } - @Directive({selector: '[dir-a]', standalone: true}) + @Directive({selector: '[dir-a]'}) class DirA implements OnDestroy { constructor() { initLog.push('DirA init'); @@ -1435,7 +1390,7 @@ describe('hot module replacement', () => { } } - @Directive({selector: '[dir-b]', standalone: true}) + @Directive({selector: '[dir-b]'}) class DirB implements OnDestroy { constructor() { initLog.push('DirB init'); @@ -1447,7 +1402,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp, DirA, DirB], template: ``, }) @@ -1472,7 +1426,7 @@ describe('hot module replacement', () => { const initLog: string[] = []; let destroyCount = 0; - @Directive({selector: '[dir-a]', standalone: true}) + @Directive({selector: '[dir-a]'}) class DirA implements OnDestroy { constructor() { initLog.push('DirA init'); @@ -1483,7 +1437,7 @@ describe('hot module replacement', () => { } } - @Directive({selector: '[dir-b]', standalone: true}) + @Directive({selector: '[dir-b]'}) class DirB implements OnDestroy { constructor() { initLog.push('DirB init'); @@ -1496,7 +1450,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', hostDirectives: [DirA, DirB], }; @@ -1513,7 +1466,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1540,14 +1492,14 @@ describe('hot module replacement', () => { let instance!: ChildCmp; const injectedInstances: [unknown, ChildCmp][] = []; - @Directive({selector: '[dir-a]', standalone: true}) + @Directive({selector: '[dir-a]'}) class DirA { constructor() { injectedInstances.push([this, inject(ChildCmp)]); } } - @Directive({selector: '[dir-b]', standalone: true}) + @Directive({selector: '[dir-b]'}) class DirB { constructor() { injectedInstances.push([this, inject(ChildCmp)]); @@ -1556,7 +1508,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '
', imports: [DirA, DirB], }; @@ -1569,7 +1520,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1596,14 +1546,14 @@ describe('hot module replacement', () => { const token = new InjectionToken('TEST_TOKEN'); const injectedValues: [unknown, string][] = []; - @Directive({selector: '[dir-a]', standalone: true}) + @Directive({selector: '[dir-a]'}) class DirA { constructor() { injectedValues.push([this, inject(token)]); } } - @Directive({selector: '[dir-b]', standalone: true}) + @Directive({selector: '[dir-b]'}) class DirB { constructor() { injectedValues.push([this, inject(token)]); @@ -1612,7 +1562,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '
', imports: [DirA, DirB], providers: [{provide: token, useValue: 'provided value'}], @@ -1622,7 +1571,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1648,14 +1596,14 @@ describe('hot module replacement', () => { const token = new InjectionToken('TEST_TOKEN'); const injectedValues: [unknown, string][] = []; - @Directive({selector: '[dir-a]', standalone: true}) + @Directive({selector: '[dir-a]'}) class DirA { constructor() { injectedValues.push([this, inject(token)]); } } - @Directive({selector: '[dir-b]', standalone: true}) + @Directive({selector: '[dir-b]'}) class DirB { constructor() { injectedValues.push([this, inject(token)]); @@ -1664,7 +1612,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '
', imports: [DirA, DirB], viewProviders: [{provide: token, useValue: 'provided value'}], @@ -1674,7 +1621,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1701,7 +1647,6 @@ describe('hot module replacement', () => { it('should maintain attribute host bindings on a replaced component', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello', host: { '[attr.bar]': 'state', @@ -1714,7 +1659,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1755,7 +1699,6 @@ describe('hot module replacement', () => { it('should maintain class host bindings on a replaced component', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello', host: { '[class.bar]': 'state', @@ -1768,7 +1711,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1796,7 +1738,6 @@ describe('hot module replacement', () => { it('should maintain style host bindings on a replaced component', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello', host: { '[style.height]': 'state ? "5px" : "20px"', @@ -1809,7 +1750,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1860,7 +1800,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'hello', }; @@ -1868,7 +1807,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1888,7 +1826,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1896,7 +1833,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: `hello`, }) @@ -1931,7 +1867,6 @@ describe('hot module replacement', () => { let instance!: ChildCmp; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: 'Hello {{name}}!', }; @@ -1945,7 +1880,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -1984,7 +1918,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -1992,7 +1925,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: 'Hello {{name}}!', }) @@ -2037,7 +1969,6 @@ describe('hot module replacement', () => { let instance!: ChildCmp; const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '{count, select, 10 {ten} 20 {twenty} other {other}}', }; @@ -2051,7 +1982,6 @@ describe('hot module replacement', () => { } @Component({ - standalone: true, imports: [ChildCmp], template: '', }) @@ -2092,7 +2022,6 @@ describe('hot module replacement', () => { const initialMetadata: Component = { selector: 'child-cmp', - standalone: true, template: '', }; @@ -2100,7 +2029,6 @@ describe('hot module replacement', () => { class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: '{count, select, 10 {ten} 20 {twenty} other {other}}', }) diff --git a/packages/core/test/acceptance/host_directives_spec.ts b/packages/core/test/acceptance/host_directives_spec.ts index b023d4c1fce..b46ca2d0151 100644 --- a/packages/core/test/acceptance/host_directives_spec.ts +++ b/packages/core/test/acceptance/host_directives_spec.ts @@ -38,7 +38,6 @@ describe('host directives', () => { const logs: string[] = []; @Directive({ - standalone: true, host: {'host-dir-attr': '', 'class': 'host-dir', 'style': 'height: 50px'}, }) class HostDir { @@ -101,14 +100,14 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class OtherHostDir { constructor() { logs.push('OtherHostDir'); } } - @Directive({standalone: true}) + @Directive() class HostDir { constructor() { logs.push('HostDir'); @@ -149,14 +148,14 @@ describe('host directives', () => { }); } - @Directive({standalone: true, host: {'one': 'base'}}) + @Directive({host: {'one': 'base'}}) class OtherHostDir { constructor() { inject(Dir); } } - @Directive({standalone: true, host: {'two': 'base'}}) + @Directive({host: {'two': 'base'}}) class HostDir { constructor() { inject(Dir); @@ -192,7 +191,6 @@ describe('host directives', () => { 'id': 'leaf-id', }, providers: [{provide: token, useValue: 'leaf value'}], - standalone: true, }) class Chain1_3 { constructor(@Inject(token) tokenValue: string) { @@ -202,7 +200,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, hostDirectives: [Chain1_3], }) class Chain1_2 { @@ -212,7 +209,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, hostDirectives: [Chain1_2], }) class Chain1 { @@ -222,7 +218,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, host: { 'class': 'middle', 'id': 'middle-id', @@ -236,7 +231,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, hostDirectives: [Chain2_2], }) class Chain2 { @@ -245,14 +239,14 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class Chain3_2 { constructor() { logs.push('Chain3 - level 2'); } } - @Directive({standalone: true, hostDirectives: [Chain3_2]}) + @Directive({hostDirectives: [Chain3_2]}) class Chain3 { constructor() { logs.push('Chain3 - level 1'); @@ -276,7 +270,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class SelectorMatchedHostDir { constructor() { logs.push('SelectorMatchedHostDir'); @@ -327,14 +321,14 @@ describe('host directives', () => { let firstHostDirInstance!: FirstHostDir; let secondHostDirInstance!: SecondHostDir; - @Directive({standalone: true}) + @Directive() class SecondHostDir { constructor() { secondHostDirInstance = this; } } - @Directive({standalone: true, hostDirectives: [SecondHostDir]}) + @Directive({hostDirectives: [SecondHostDir]}) class FirstHostDir { constructor() { firstHostDirInstance = this; @@ -374,12 +368,12 @@ describe('host directives', () => { }); it('should be able to reference exported host directives', () => { - @Directive({standalone: true, exportAs: 'secondHost'}) + @Directive({exportAs: 'secondHost'}) class SecondHostDir { name = 'SecondHost'; } - @Directive({standalone: true, hostDirectives: [SecondHostDir], exportAs: 'firstHost'}) + @Directive({hostDirectives: [SecondHostDir], exportAs: 'firstHost'}) class FirstHostDir { name = 'FirstHost'; } @@ -412,42 +406,42 @@ describe('host directives', () => { it('should execute inherited host directives in the correct order', () => { const logs: string[] = []; - @Directive({standalone: true}) + @Directive() class HostGrandparent_1 { constructor() { logs.push('HostGrandparent_1'); } } - @Directive({standalone: true}) + @Directive() class HostGrandparent_2 { constructor() { logs.push('HostGrandparent_2'); } } - @Directive({standalone: true, hostDirectives: [HostGrandparent_1, HostGrandparent_2]}) + @Directive({hostDirectives: [HostGrandparent_1, HostGrandparent_2]}) class Grandparent { constructor() { logs.push('Grandparent'); } } - @Directive({standalone: true}) + @Directive() class HostParent_1 { constructor() { logs.push('HostParent_1'); } } - @Directive({standalone: true}) + @Directive() class HostParent_2 { constructor() { logs.push('HostParent_2'); } } - @Directive({standalone: true, hostDirectives: [HostParent_1, HostParent_2]}) + @Directive({hostDirectives: [HostParent_1, HostParent_2]}) class Parent extends Grandparent { constructor() { super(); @@ -455,14 +449,14 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class HostDir_1 { constructor() { logs.push('HostDir_1'); } } - @Directive({standalone: true}) + @Directive() class HostDir_2 { constructor() { logs.push('HostDir_2'); @@ -508,7 +502,7 @@ describe('host directives', () => { it('should invoke lifecycle hooks from the host directives', () => { const logs: string[] = []; - @Directive({standalone: true}) + @Directive() class HostDir implements OnInit, AfterViewInit, AfterViewChecked { ngOnInit() { logs.push('HostDir - ngOnInit'); @@ -523,7 +517,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class OtherHostDir implements OnInit, AfterViewInit, AfterViewChecked { ngOnInit() { logs.push('OtherHostDir - ngOnInit'); @@ -587,7 +581,7 @@ describe('host directives', () => { const logs: string[] = []; // Utility so we don't have to repeat the logging code. - @Directive({standalone: true}) + @Directive() abstract class LogsLifecycles implements OnInit, AfterViewInit { abstract name: string; @@ -600,12 +594,12 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class ChildHostDir extends LogsLifecycles { override name = 'ChildHostDir'; } - @Directive({standalone: true}) + @Directive() class OtherChildHostDir extends LogsLifecycles { override name = 'OtherChildHostDir'; } @@ -619,12 +613,12 @@ describe('host directives', () => { override name = 'Child'; } - @Directive({standalone: true}) + @Directive() class ParentHostDir extends LogsLifecycles { override name = 'ParentHostDir'; } - @Directive({standalone: true}) + @Directive() class OtherParentHostDir extends LogsLifecycles { override name = 'OtherParentHostDir'; } @@ -681,7 +675,7 @@ describe('host directives', () => { let logs: string[] = []; // Utility so we don't have to repeat the logging code. - @Directive({standalone: true}) + @Directive() abstract class LogsLifecycles implements OnChanges { @Input() someInput: any; abstract name: string; @@ -691,12 +685,12 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class HostDir extends LogsLifecycles { override name = 'HostDir'; } - @Directive({standalone: true}) + @Directive() class OtherHostDir extends LogsLifecycles { override name = 'OtherHostDir'; } @@ -757,7 +751,7 @@ describe('host directives', () => { it('should apply the host bindings from all host directives', () => { const clicks: string[] = []; - @Directive({standalone: true, host: {'host-dir-attr': 'true', '(click)': 'handleClick()'}}) + @Directive({host: {'host-dir-attr': 'true', '(click)': 'handleClick()'}}) class HostDir { handleClick() { clicks.push('HostDir'); @@ -765,7 +759,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, host: {'other-host-dir-attr': 'true', '(click)': 'handleClick()'}, }) class OtherHostDir { @@ -809,10 +802,10 @@ describe('host directives', () => { }); it('should have the host bindings take precedence over the ones from the host directives', () => { - @Directive({standalone: true, host: {'id': 'host-dir'}}) + @Directive({host: {'id': 'host-dir'}}) class HostDir {} - @Directive({standalone: true, host: {'id': 'other-host-dir'}}) + @Directive({host: {'id': 'other-host-dir'}}) class OtherHostDir {} @Directive({ @@ -843,14 +836,14 @@ describe('host directives', () => { let firstHostDirInstance!: FirstHostDir; let secondHostDirInstance!: SecondHostDir; - @Directive({standalone: true}) + @Directive() class SecondHostDir { constructor() { secondHostDirInstance = this; } } - @Directive({standalone: true, hostDirectives: [SecondHostDir]}) + @Directive({hostDirectives: [SecondHostDir]}) class FirstHostDir { constructor() { firstHostDirInstance = this; @@ -901,7 +894,7 @@ describe('host directives', () => { hostDir = inject(HostDir); } - @Directive({standalone: true}) + @Directive() class HostDir { constructor() { hostDirectiveInstance = this; @@ -940,7 +933,7 @@ describe('host directives', () => { let firstHostDirInstance!: FirstHostDir; let secondHostDirInstance!: SecondHostDir; - @Directive({standalone: true}) + @Directive() class SecondHostDir { host = inject(Host); @@ -949,7 +942,7 @@ describe('host directives', () => { } } - @Directive({standalone: true, hostDirectives: [SecondHostDir]}) + @Directive({hostDirectives: [SecondHostDir]}) class FirstHostDir { host = inject(Host); @@ -993,7 +986,7 @@ describe('host directives', () => { let firstHostDirInstance!: FirstHostDir; let secondHostDirInstance!: SecondHostDir; - @Directive({standalone: true, providers: [{provide: token, useValue: 'SecondDir'}]}) + @Directive({providers: [{provide: token, useValue: 'SecondDir'}]}) class SecondHostDir { tokenValue = inject(token); @@ -1003,7 +996,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, hostDirectives: [SecondHostDir], providers: [{provide: token, useValue: 'FirstDir'}], }) @@ -1052,11 +1044,10 @@ describe('host directives', () => { const firstToken = new InjectionToken('firstToken'); const secondToken = new InjectionToken('secondToken'); - @Directive({standalone: true, providers: [{provide: secondToken, useValue: 'SecondDir'}]}) + @Directive({providers: [{provide: secondToken, useValue: 'SecondDir'}]}) class SecondHostDir {} @Directive({ - standalone: true, hostDirectives: [SecondHostDir], providers: [{provide: firstToken, useValue: 'FirstDir'}], }) @@ -1092,7 +1083,7 @@ describe('host directives', () => { const token = new InjectionToken('token'); let tokenValue: string | undefined; - @Directive({standalone: true, providers: [{provide: token, useValue: 'host-dir'}]}) + @Directive({providers: [{provide: token, useValue: 'host-dir'}]}) class HostDir {} @Component({ @@ -1131,7 +1122,7 @@ describe('host directives', () => { const token = new InjectionToken('token'); let tokenValue: string | null = null; - @Directive({standalone: true}) + @Directive() class HostDir { constructor() { tokenValue = inject(token, {optional: true}); @@ -1161,7 +1152,7 @@ describe('host directives', () => { }); it('should throw a circular dependency error if a host and a host directive inject each other', () => { - @Directive({standalone: true}) + @Directive() class HostDir { host = inject(Host); } @@ -1190,7 +1181,7 @@ describe('host directives', () => { it('should inject a valid ChangeDetectorRef when attached to a component', () => { type InternalChangeDetectorRef = ChangeDetectorRef & {_lView: unknown}; - @Directive({standalone: true}) + @Directive() class HostDir { changeDetectorRef = inject(ChangeDetectorRef) as InternalChangeDetectorRef; } @@ -1238,7 +1229,7 @@ describe('host directives', () => { it('should not emit to an output of a host directive that has not been exposed', () => { let hostDirectiveInstance: HostDir | undefined; - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit()'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit()'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); @@ -1274,7 +1265,7 @@ describe('host directives', () => { }); it('should emit to an output of a host directive that has been exposed', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("hello")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("hello")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1310,7 +1301,7 @@ describe('host directives', () => { }); it('should emit to an output of a host directive that has been exposed under an alias', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("hello")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("hello")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1344,7 +1335,7 @@ describe('host directives', () => { }); it('should alias to the public name of the host directive output, not the private one', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("hello")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("hello")'}}) class HostDir { @Output('wasClicked') hasBeenClicked = new EventEmitter(); } @@ -1381,7 +1372,7 @@ describe('host directives', () => { }); it('should emit to an output of a host that has the same name as a non-exposed output of a host directive', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1415,7 +1406,7 @@ describe('host directives', () => { }); it('should emit to an output of a host that has the same name as an exposed output of a host directive', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1451,7 +1442,7 @@ describe('host directives', () => { }); it('should emit to an output of a host that has the same name as the alias of a host directive output', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("HostDir")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1487,7 +1478,7 @@ describe('host directives', () => { }); it('should not expose the same output more than once', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit()'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit()'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1526,7 +1517,7 @@ describe('host directives', () => { @Output() hasBeenClicked = new EventEmitter(); } - @Directive({standalone: true}) + @Directive() class HostDir extends ParentDir {} @Directive({ @@ -1555,12 +1546,12 @@ describe('host directives', () => { }); it('should emit to an output that was exposed from one host directive, but not another', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("ExposedHostDir")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("ExposedHostDir")'}}) class ExposedHostDir { @Output() hasBeenClicked = new EventEmitter(); } - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("UnExposedHostDir")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("UnExposedHostDir")'}}) class UnExposedHostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1596,7 +1587,6 @@ describe('host directives', () => { it('should emit to outputs from different host directives that have been aliased to the same name', () => { @Directive({ - standalone: true, host: {'(click)': 'firstHasBeenClicked.emit("FirstHostDir")'}, }) class FirstHostDir { @@ -1604,7 +1594,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, host: {'(click)': 'secondHasBeenClicked.emit("SecondHostDir")'}, }) class SecondHostDir { @@ -1642,7 +1631,7 @@ describe('host directives', () => { }); it('should emit to an output of an inherited host directive that has been exposed', () => { - @Directive({standalone: true, host: {'(click)': 'hasBeenClicked.emit("hello")'}}) + @Directive({host: {'(click)': 'hasBeenClicked.emit("hello")'}}) class HostDir { @Output() hasBeenClicked = new EventEmitter(); } @@ -1685,7 +1674,7 @@ describe('host directives', () => { describe('inputs', () => { it('should not set an input of a host directive that has not been exposed', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1714,7 +1703,7 @@ describe('host directives', () => { }); it('should set the input of a host directive that has been exposed', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1746,7 +1735,7 @@ describe('host directives', () => { }); it('should set an input of a host directive that has been exposed under an alias', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1778,7 +1767,7 @@ describe('host directives', () => { }); it('should alias to the public name of the host directive input, not the private one', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input('colorAlias') color?: string; } @@ -1810,7 +1799,7 @@ describe('host directives', () => { }); it('should set an input of a host that has the same name as a non-exposed input of a host directive', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1850,7 +1839,7 @@ describe('host directives', () => { }); it('should set an input of a host that has the same name as an exposed input of a host directive', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1890,7 +1879,7 @@ describe('host directives', () => { }); it('should set an input of a host that has the same name as the alias of a host directive input', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -1935,7 +1924,7 @@ describe('host directives', () => { @Input() color?: string; } - @Directive({standalone: true}) + @Directive() class HostDir extends ParentDir {} @Directive({ @@ -1967,12 +1956,12 @@ describe('host directives', () => { }); it('should set an input that was exposed from one host directive, but not another', () => { - @Directive({standalone: true}) + @Directive() class ExposedHostDir { @Input() color?: string; } - @Directive({standalone: true}) + @Directive() class UnExposedHostDir { @Input() color?: string; } @@ -2010,12 +1999,12 @@ describe('host directives', () => { }); it('should set inputs from different host directives that have been aliased to the same name', () => { - @Directive({standalone: true}) + @Directive() class FirstHostDir { @Input() firstColor?: string; } - @Directive({standalone: true}) + @Directive() class SecondHostDir { @Input() secondColor?: string; } @@ -2056,7 +2045,7 @@ describe('host directives', () => { }); it('should not set a static input of a host directive that has not been exposed', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -2084,7 +2073,7 @@ describe('host directives', () => { }); it('should set a static input of a host directive that has been exposed', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -2111,7 +2100,7 @@ describe('host directives', () => { }); it('should set a static input of a host directive that has been exposed under an alias', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -2138,7 +2127,7 @@ describe('host directives', () => { }); it('should alias to the public name of a static host directive input, not the private one', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input('colorAlias') color?: string; } @@ -2165,12 +2154,12 @@ describe('host directives', () => { }); it('should set a static input that was exposed from one host directive, but not another', () => { - @Directive({standalone: true}) + @Directive() class ExposedHostDir { @Input() color?: string; } - @Directive({standalone: true}) + @Directive() class UnExposedHostDir { @Input() color?: string; } @@ -2200,12 +2189,12 @@ describe('host directives', () => { }); it('should set static inputs from different host directives that have been aliased to the same name', () => { - @Directive({standalone: true}) + @Directive() class FirstHostDir { @Input() firstColor?: string; } - @Directive({standalone: true}) + @Directive() class SecondHostDir { @Input() secondColor?: string; } @@ -2241,7 +2230,7 @@ describe('host directives', () => { it('should not expose an input under its host directive alias if a host directive is not applied', () => { const logs: string[] = []; - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir implements OnChanges { @Input('colorAlias') color?: string; @@ -2252,13 +2241,11 @@ describe('host directives', () => { @Directive({ selector: '[dir]', - standalone: true, hostDirectives: [{directive: HostDir, inputs: ['colorAlias: buttonColor']}], }) class Dir {} @Component({ - standalone: true, imports: [Dir, HostDir], // Note that `[dir]` doesn't match on the `button` on purpose. // The wrong behavior would be if the `buttonColor` binding worked on `host-dir`. @@ -2284,7 +2271,7 @@ describe('host directives', () => { }); it('should set the input of an inherited host directive that has been exposed', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; } @@ -2326,7 +2313,7 @@ describe('host directives', () => { let firstDirChangeEvent: SimpleChanges | undefined; let secondDirChangeEvent: SimpleChanges | undefined; - @Directive({standalone: true}) + @Directive() class FirstHostDir implements OnChanges { @Input() color?: string; @@ -2335,7 +2322,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class SecondHostDir implements OnChanges { @Input() color?: string; @@ -2413,7 +2400,7 @@ describe('host directives', () => { let firstDirChangeEvent: SimpleChanges | undefined; let secondDirChangeEvent: SimpleChanges | undefined; - @Directive({standalone: true}) + @Directive() class FirstHostDir implements OnChanges { @Input('firstAlias') color?: string; @@ -2422,7 +2409,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class SecondHostDir implements OnChanges { @Input('secondAlias') color?: string; @@ -2500,7 +2487,7 @@ describe('host directives', () => { let firstDirChangeEvent: SimpleChanges | undefined; let secondDirChangeEvent: SimpleChanges | undefined; - @Directive({standalone: true}) + @Directive() class FirstHostDir implements OnChanges { @Input() color?: string; @@ -2509,7 +2496,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class SecondHostDir implements OnChanges { @Input() color?: string; @@ -2566,7 +2553,7 @@ describe('host directives', () => { it('should invoke ngOnChanges when a static aliased host directive input is set', () => { let latestChangeEvent: SimpleChanges | undefined; - @Directive({standalone: true}) + @Directive() class HostDir implements OnChanges { @Input('colorAlias') color?: string; @@ -2610,14 +2597,14 @@ describe('host directives', () => { let otherHostDirInstance!: OtherHostDir; let plainDirInstance!: PlainDir; - @Directive({standalone: true}) + @Directive() class HostDir { constructor() { hostDirInstance = this; } } - @Directive({standalone: true}) + @Directive() class OtherHostDir { constructor() { otherHostDirInstance = this; @@ -2666,7 +2653,7 @@ describe('host directives', () => { it('should be able to retrieve components that have host directives using ng.getComponent', () => { let compInstance!: Comp; - @Directive({standalone: true}) + @Directive() class HostDir {} @Component({ @@ -2699,7 +2686,7 @@ describe('host directives', () => { it('should be able to retrieve components that have host directives using DebugNode.componentInstance', () => { let compInstance!: Comp; - @Directive({standalone: true}) + @Directive() class HostDir {} @Component({ @@ -2730,7 +2717,7 @@ describe('host directives', () => { }); it('should be able to query by a host directive', () => { - @Directive({standalone: true}) + @Directive() class HostDir {} @Component({ @@ -2787,7 +2774,6 @@ describe('host directives', () => { const logs: string[] = []; @Directive({ - standalone: true, host: {'host-dir-attr': '', 'class': 'host-dir', 'style': 'height: 50px'}, }) class HostDir { @@ -2821,7 +2807,7 @@ describe('host directives', () => { it('should invoke lifecycle hooks on host directives applied to a root component', () => { const logs: string[] = []; - @Directive({standalone: true}) + @Directive() class HostDir implements OnInit, AfterViewInit, AfterViewChecked { ngOnInit() { logs.push('HostDir - ngOnInit'); @@ -2836,7 +2822,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class OtherHostDir implements OnInit, AfterViewInit, AfterViewChecked { ngOnInit() { logs.push('OtherHostDir - ngOnInit'); @@ -2889,7 +2875,6 @@ describe('host directives', () => { describe('host bindings', () => { it('should support host attribute bindings coming from the host directives', () => { @Directive({ - standalone: true, host: { '[attr.host-dir-only]': 'value', '[attr.shadowed-attr]': 'value', @@ -2900,7 +2885,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, host: { '[attr.other-host-dir-only]': 'value', '[attr.shadowed-attr]': 'value', @@ -2946,14 +2930,14 @@ describe('host directives', () => { it('should support host event bindings coming from the host directives', () => { const logs: string[] = []; - @Directive({standalone: true, host: {'(click)': 'handleClick()'}}) + @Directive({host: {'(click)': 'handleClick()'}}) class HostDir { handleClick() { logs.push('HostDir'); } } - @Directive({standalone: true, host: {'(click)': 'handleClick()'}}) + @Directive({host: {'(click)': 'handleClick()'}}) class OtherHostDir { handleClick() { logs.push('OtherHostDir'); @@ -2981,10 +2965,10 @@ describe('host directives', () => { }); it('should have the host bindings of the root component take precedence over the ones from the host directives', () => { - @Directive({standalone: true, host: {'id': 'host-dir'}}) + @Directive({host: {'id': 'host-dir'}}) class HostDir {} - @Directive({standalone: true, host: {'id': 'other-host-dir'}}) + @Directive({host: {'id': 'other-host-dir'}}) class OtherHostDir {} @Component({ @@ -3005,7 +2989,7 @@ describe('host directives', () => { it('should allow the host directive to inject the root component', () => { let hostDirInstance!: HostDir; - @Directive({standalone: true}) + @Directive() class HostDir { host = inject(HostComp); @@ -3030,7 +3014,7 @@ describe('host directives', () => { it('should allow the root component to inject the host directive', () => { let hostDirInstance!: HostDir; - @Directive({standalone: true}) + @Directive() class HostDir { constructor() { hostDirInstance = this; @@ -3057,7 +3041,7 @@ describe('host directives', () => { let firstHostDirInstance!: FirstHostDir; let secondHostDirInstance!: SecondHostDir; - @Directive({standalone: true, providers: [{provide: token, useValue: 'SecondDir'}]}) + @Directive({providers: [{provide: token, useValue: 'SecondDir'}]}) class SecondHostDir { tokenValue = inject(token); @@ -3067,7 +3051,6 @@ describe('host directives', () => { } @Directive({ - standalone: true, hostDirectives: [SecondHostDir], providers: [{provide: token, useValue: 'FirstDir'}], }) @@ -3108,11 +3091,10 @@ describe('host directives', () => { const firstToken = new InjectionToken('firstToken'); const secondToken = new InjectionToken('secondToken'); - @Directive({standalone: true, providers: [{provide: secondToken, useValue: 'SecondDir'}]}) + @Directive({providers: [{provide: secondToken, useValue: 'SecondDir'}]}) class SecondHostDir {} @Directive({ - standalone: true, hostDirectives: [SecondHostDir], providers: [{provide: firstToken, useValue: 'FirstDir'}], }) @@ -3139,7 +3121,7 @@ describe('host directives', () => { let hostDirInstance!: HostDir; let otherHostDirInstance!: OtherHostDir; - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; @@ -3148,7 +3130,7 @@ describe('host directives', () => { } } - @Directive({standalone: true}) + @Directive() class OtherHostDir { @Input() color?: string; @@ -3192,7 +3174,7 @@ describe('host directives', () => { it('should set inputs that only exist on a host directive when using `setInput`', () => { let hostDirInstance!: HostDir; - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; @@ -3229,7 +3211,7 @@ describe('host directives', () => { it('should set inputs that only exist on the root component when using `setInput`', () => { let hostDirInstance!: HostDir; - @Directive({standalone: true}) + @Directive() class HostDir { @Input() color?: string; @@ -3262,7 +3244,7 @@ describe('host directives', () => { it('should use the input name alias in `setInput`', () => { let hostDirInstance!: HostDir; - @Directive({standalone: true}) + @Directive() class HostDir { @Input('alias') color?: string; @@ -3305,7 +3287,7 @@ describe('host directives', () => { it('should invoke ngOnChanges when setting host directive inputs using setInput', () => { let latestChanges: SimpleChanges | undefined; - @Directive({standalone: true}) + @Directive() class HostDir implements OnChanges { @Input('alias') color?: string; @@ -3354,13 +3336,13 @@ describe('host directives', () => { }); it('should throw an error if a host directive is applied multiple times to a root component', () => { - @Directive({standalone: true}) + @Directive() class DuplicateHostDir {} - @Directive({standalone: true, hostDirectives: [DuplicateHostDir]}) + @Directive({hostDirectives: [DuplicateHostDir]}) class HostDir {} - @Directive({standalone: true, hostDirectives: [HostDir, DuplicateHostDir]}) + @Directive({hostDirectives: [HostDir, DuplicateHostDir]}) class Dir {} @Component({ @@ -3425,17 +3407,16 @@ describe('host directives', () => { }); it('should throw an error if a host directive matches multiple times in a template', () => { - @Directive({standalone: true, selector: '[dir]'}) + @Directive({selector: '[dir]'}) class HostDir {} @Directive({ selector: '[dir]', hostDirectives: [HostDir], - standalone: true, }) class Dir {} - @Component({template: '
', standalone: true, imports: [HostDir, Dir]}) + @Component({template: '
', imports: [HostDir, Dir]}) class App {} expect(() => TestBed.createComponent(App)).toThrowError( @@ -3444,20 +3425,18 @@ describe('host directives', () => { }); it('should throw an error if a host directive matches multiple times on a component', () => { - @Directive({standalone: true, selector: '[dir]'}) + @Directive({selector: '[dir]'}) class HostDir {} @Component({ selector: 'comp', hostDirectives: [HostDir], - standalone: true, template: '', }) class Comp {} const baseAppMetadata = { template: '', - standalone: true, }; const expectedError = @@ -3485,10 +3464,10 @@ describe('host directives', () => { }); it('should throw an error if a host directive appears multiple times in a chain', () => { - @Directive({standalone: true}) + @Directive() class DuplicateHostDir {} - @Directive({standalone: true, hostDirectives: [DuplicateHostDir]}) + @Directive({hostDirectives: [DuplicateHostDir]}) class HostDir {} @Directive({ @@ -3512,7 +3491,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive is a component', () => { - @Component({standalone: true, template: '', selector: 'host-comp'}) + @Component({template: '', selector: 'host-comp'}) class HostComp {} @Directive({ @@ -3536,7 +3515,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive output does not exist', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Output() foo = new EventEmitter(); } @@ -3567,7 +3546,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive output alias does not exist', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Output('alias') foo = new EventEmitter(); } @@ -3598,7 +3577,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive input does not exist', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input() foo: any; } @@ -3629,7 +3608,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive input alias does not exist', () => { - @Directive({standalone: true}) + @Directive() class HostDir { @Input('alias') foo: any; } @@ -3655,7 +3634,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive tries to alias to an existing input', () => { - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir { @Input('colorAlias') color?: string; @Input() buttonColor?: string; @@ -3687,7 +3666,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive tries to alias to an existing input alias', () => { - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir { @Input('colorAlias') color?: string; @Input('buttonColorAlias') buttonColor?: string; @@ -3719,7 +3698,7 @@ describe('host directives', () => { }); it('should not throw if a host directive input aliases to the same name', () => { - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir { @Input('color') color?: string; } @@ -3747,7 +3726,7 @@ describe('host directives', () => { }); it('should throw an error if a host directive tries to alias to an existing output alias', () => { - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir { @Output('clickedAlias') clicked = new EventEmitter(); @Output('tappedAlias') tapped = new EventEmitter(); @@ -3781,7 +3760,7 @@ describe('host directives', () => { }); it('should not throw if a host directive output aliases to the same name', () => { - @Directive({selector: '[host-dir]', standalone: true}) + @Directive({selector: '[host-dir]'}) class HostDir { @Output('clicked') clicked = new EventEmitter(); } @@ -3814,20 +3793,18 @@ describe('host directives', () => { @Directive({ outputs: ['opened: triggerOpened'], selector: '[trigger]', - standalone: true, }) class Trigger { opened = new EventEmitter(); } @Directive({ - standalone: true, selector: '[host]', hostDirectives: [{directive: Trigger, outputs: ['triggerOpened']}], }) class Host {} - @Component({template: '
', standalone: true, imports: [Host]}) + @Component({template: '
', imports: [Host]}) class App {} expect(() => { @@ -3837,7 +3814,7 @@ describe('host directives', () => { }); it('should not throw when exposing an inherited aliased binding', () => { - @Directive({standalone: true}) + @Directive() abstract class Base { opened = new EventEmitter(); } @@ -3845,18 +3822,16 @@ describe('host directives', () => { @Directive({ outputs: ['opened: triggerOpened'], selector: '[trigger]', - standalone: true, }) class Trigger extends Base {} @Directive({ - standalone: true, selector: '[host]', hostDirectives: [{directive: Trigger, outputs: ['triggerOpened: hostOpened']}], }) class Host {} - @Component({template: '
', standalone: true, imports: [Host]}) + @Component({template: '
', imports: [Host]}) class App {} expect(() => { @@ -3866,13 +3841,13 @@ describe('host directives', () => { }); it('should throw an error if a duplicate directive is inherited', () => { - @Directive({standalone: true}) + @Directive() class HostDir {} - @Directive({standalone: true, hostDirectives: [HostDir]}) + @Directive({hostDirectives: [HostDir]}) class Grandparent {} - @Directive({standalone: true}) + @Directive() class Parent extends Grandparent {} @Directive({ diff --git a/packages/core/test/acceptance/i18n_spec.ts b/packages/core/test/acceptance/i18n_spec.ts index a6735d1decb..f72f40f4b2d 100644 --- a/packages/core/test/acceptance/i18n_spec.ts +++ b/packages/core/test/acceptance/i18n_spec.ts @@ -563,7 +563,6 @@ describe('runtime i18n', () => { @Component({ selector: 'defer-comp', - standalone: true, template: '
Content: @defer (when isLoaded) {beforemiddleafter} ' + '@placeholder {before
placeholder
after}!
', diff --git a/packages/core/test/acceptance/inherit_definition_feature_spec.ts b/packages/core/test/acceptance/inherit_definition_feature_spec.ts index e882cac8143..77e027f8fcc 100644 --- a/packages/core/test/acceptance/inherit_definition_feature_spec.ts +++ b/packages/core/test/acceptance/inherit_definition_feature_spec.ts @@ -794,14 +794,12 @@ describe('inheritance', () => { } @Directive({ - standalone: true, selector: 'dir', inputs: ['someInput'], }) class ActualDir extends Base {} @Component({ - standalone: true, imports: [ActualDir], template: ``, }) @@ -825,13 +823,11 @@ describe('inheritance', () => { } @Directive({ - standalone: true, selector: 'dir', }) class ActualDir extends Base {} @Component({ - standalone: true, imports: [ActualDir], template: ``, }) diff --git a/packages/core/test/acceptance/injector_profiler_spec.ts b/packages/core/test/acceptance/injector_profiler_spec.ts index f8777d92969..40371929bc0 100644 --- a/packages/core/test/acceptance/injector_profiler_spec.ts +++ b/packages/core/test/acceptance/injector_profiler_spec.ts @@ -385,7 +385,6 @@ describe('getInjectorMetadata', () => { @Component({ selector: 'lazy-comp', template: `lazy component`, - standalone: true, imports: [ModuleB], }) class LazyComponent { @@ -398,7 +397,6 @@ describe('getInjectorMetadata', () => { } @Component({ - standalone: true, imports: [RouterOutlet, ModuleA], template: ``, }) @@ -667,7 +665,6 @@ describe('getInjectorProviders', () => { selector: 'my-comp-c', template: 'hello world', imports: [ModuleE, ModuleC], - standalone: true, }) class MyStandaloneComponentC {} @@ -675,7 +672,6 @@ describe('getInjectorProviders', () => { selector: 'my-comp-b', template: 'hello world', imports: [ModuleD, ModuleF], - standalone: true, }) class MyStandaloneComponentB {} @@ -686,7 +682,6 @@ describe('getInjectorProviders', () => { `, imports: [ModuleD, MyStandaloneComponentB, MyStandaloneComponentC], - standalone: true, }) class MyStandaloneComponent {} @@ -743,7 +738,6 @@ describe('getInjectorProviders', () => { selector: 'my-comp-b', template: 'hello world', imports: [ModuleA], - standalone: true, }) class MyStandaloneComponentB { injector = inject(Injector); @@ -753,7 +747,6 @@ describe('getInjectorProviders', () => { selector: 'my-comp', template: ``, imports: [MyStandaloneComponentB, RouterOutlet], - standalone: true, }) class MyStandaloneComponent { injector = inject(Injector); @@ -809,7 +802,7 @@ describe('getInjectorProviders', () => { it('should be able to determine providers in a lazy route that has providers', fakeAsync(() => { class MyService {} - @Component({selector: 'my-comp-b', template: 'hello world', standalone: true}) + @Component({selector: 'my-comp-b', template: 'hello world'}) class MyStandaloneComponentB { injector = inject(Injector); } @@ -818,7 +811,6 @@ describe('getInjectorProviders', () => { selector: 'my-comp', template: ``, imports: [MyStandaloneComponentB, RouterOutlet], - standalone: true, }) class MyStandaloneComponent { injector = inject(Injector); @@ -871,7 +863,7 @@ describe('getInjectorProviders', () => { it('should be able to get injector providers for element injectors created by components rendering in an ngFor', () => { class MyService {} - @Component({selector: 'item-cmp', template: 'item', standalone: true, providers: [MyService]}) + @Component({selector: 'item-cmp', template: 'item', providers: [MyService]}) class ItemComponent { injector = inject(Injector); } @@ -882,7 +874,6 @@ describe('getInjectorProviders', () => { `, imports: [ItemComponent, NgForOf], - standalone: true, }) class MyStandaloneComponent { injector = inject(Injector); @@ -911,7 +902,7 @@ describe('getInjectorProviders', () => { it('should be able to get injector providers for element injectors created by components rendering in a @for', () => { class MyService {} - @Component({selector: 'item-cmp', template: 'item', standalone: true, providers: [MyService]}) + @Component({selector: 'item-cmp', template: 'item', providers: [MyService]}) class ItemComponent { injector = inject(Injector); } @@ -924,7 +915,6 @@ describe('getInjectorProviders', () => { } `, imports: [ItemComponent], - standalone: true, }) class MyStandaloneComponent { injector = inject(Injector); @@ -978,7 +968,6 @@ describe('getDependenciesFromInjectable', () => { @Directive({ selector: '[my-directive]', - standalone: true, }) class MyStandaloneDirective { serviceFromHost = inject(MyServiceH, {host: true, optional: true}); @@ -993,7 +982,6 @@ describe('getDependenciesFromInjectable', () => { selector: 'my-comp-c', template: 'hello world', imports: [], - standalone: true, }) class MyStandaloneComponentC {} @@ -1001,7 +989,6 @@ describe('getDependenciesFromInjectable', () => { selector: 'my-comp-b', template: '', imports: [MyStandaloneComponentC, MyStandaloneDirective], - standalone: true, }) class MyStandaloneComponentB { myService = inject(MyService, {optional: true}); @@ -1019,7 +1006,6 @@ describe('getDependenciesFromInjectable', () => { template: ``, imports: [RouterOutlet, ModuleA], providers: [MyServiceG, {provide: MyServiceH, useValue: 'MyStandaloneComponent'}], - standalone: true, }) class MyStandaloneComponent { injector = inject(Injector); @@ -1182,7 +1168,7 @@ describe('getDependenciesFromInjectable', () => { @NgModule({imports: [ModuleB, ModuleC]}) class ModuleD {} - @Component({selector: 'my-comp', template: 'hello world', imports: [ModuleD], standalone: true}) + @Component({selector: 'my-comp', template: 'hello world', imports: [ModuleD]}) class MyStandaloneComponent { myService = inject(MyService); } @@ -1262,7 +1248,6 @@ describe('getInjectorResolutionPath', () => { @Component({ selector: 'lazy-comp', template: `lazy component`, - standalone: true, imports: [ModuleB], }) class LazyComponent { @@ -1272,7 +1257,6 @@ describe('getInjectorResolutionPath', () => { } @Component({ - standalone: true, imports: [RouterOutlet, ModuleA], template: ``, }) diff --git a/packages/core/test/acceptance/integration_spec.ts b/packages/core/test/acceptance/integration_spec.ts index 62c598f9993..5cc3a2e5dbd 100644 --- a/packages/core/test/acceptance/integration_spec.ts +++ b/packages/core/test/acceptance/integration_spec.ts @@ -2718,7 +2718,6 @@ describe('acceptance integration tests', () => { it('should support template literals in expressions', () => { @Component({ - standalone: true, template: 'Message: {{`Hello, ${name} - ${value}`}}', }) class TestComponent { diff --git a/packages/core/test/acceptance/internal_spec.ts b/packages/core/test/acceptance/internal_spec.ts index f0b585219fb..7c553fee2bb 100644 --- a/packages/core/test/acceptance/internal_spec.ts +++ b/packages/core/test/acceptance/internal_spec.ts @@ -21,7 +21,6 @@ describe('internal utilities', () => { describe('getClosestComponentName', () => { it('should get the name from a node placed inside a root component', () => { @Component({ - standalone: true, template: `
`, }) class App {} @@ -36,12 +35,10 @@ describe('internal utilities', () => { @Component({ selector: 'comp', template: `
`, - standalone: true, }) class Comp {} @Component({ - standalone: true, template: ``, imports: [Comp], }) @@ -57,12 +54,10 @@ describe('internal utilities', () => { @Component({ selector: 'comp', template: `
`, - standalone: true, }) class Comp {} @Component({ - standalone: true, template: ` @for (current of [1]; track $index) { @@ -81,12 +76,10 @@ describe('internal utilities', () => { it('should get the name from a node that has a directive', () => { @Directive({ selector: 'dir', - standalone: true, }) class Dir {} @Component({ - standalone: true, template: `
`, imports: [Dir], }) @@ -100,7 +93,6 @@ describe('internal utilities', () => { it('should return null when not placed in a component', () => { @Component({ - standalone: true, template: '', }) class App {} @@ -114,12 +106,10 @@ describe('internal utilities', () => { @Component({ selector: 'comp', template: `
`, - standalone: true, }) class Comp {} @Component({ - standalone: true, template: ``, }) class App { @@ -141,7 +131,6 @@ describe('internal utilities', () => { @Component({ selector: 'comp', template: `
`, - standalone: true, }) class Comp {} diff --git a/packages/core/test/acceptance/let_spec.ts b/packages/core/test/acceptance/let_spec.ts index bcd82651359..35607e92a99 100644 --- a/packages/core/test/acceptance/let_spec.ts +++ b/packages/core/test/acceptance/let_spec.ts @@ -23,7 +23,6 @@ import {TestBed} from '@angular/core/testing'; describe('@let declarations', () => { it('should update the value of a @let declaration over time', () => { @Component({ - standalone: true, template: ` @let multiplier = 2; @let result = value * multiplier; @@ -51,7 +50,6 @@ describe('@let declarations', () => { const values: number[] = []; @Component({ - standalone: true, template: ` @let result = value * 2; @@ -81,7 +79,6 @@ describe('@let declarations', () => { it('should be able to access @let declarations through multiple levels of views', () => { @Component({ - standalone: true, template: ` @if (true) { @if (true) { @@ -110,7 +107,6 @@ describe('@let declarations', () => { it('should be able to access @let declarations from parent view before they are declared', () => { @Component({ - standalone: true, template: ` @if (true) { {{value}} times {{multiplier}} is {{result}} @@ -142,7 +138,6 @@ describe('@let declarations', () => { @Directive({ selector: '[dir]', - standalone: true, }) class TestDirective { @Output() testEvent = new EventEmitter(); @@ -153,7 +148,6 @@ describe('@let declarations', () => { } @Component({ - standalone: true, imports: [TestDirective], template: `
@@ -186,7 +180,7 @@ describe('@let declarations', () => { }); it('should be able to use pipes injecting ChangeDetectorRef in a let declaration', () => { - @Pipe({name: 'double', standalone: true}) + @Pipe({name: 'double'}) class DoublePipe implements PipeTransform { changeDetectorRef = inject(ChangeDetectorRef); @@ -196,7 +190,6 @@ describe('@let declarations', () => { } @Component({ - standalone: true, template: ` @let result = value | double; Result: {{result}} @@ -218,7 +211,6 @@ describe('@let declarations', () => { it('should be able to use local references inside @let declarations', () => { @Component({ - standalone: true, template: ` @@ -240,7 +232,6 @@ describe('@let declarations', () => { it('should be able to proxy a local reference through @let declarations', () => { @Component({ - standalone: true, template: ` @@ -271,7 +262,6 @@ describe('@let declarations', () => { let calls = 0; @Component({ - standalone: true, template: ` @let one = getOne(); @let two = one + getTwo(); @@ -302,7 +292,6 @@ describe('@let declarations', () => { it('should resolve a @let declaration correctly within an embedded view that uses a value from parent view and cannot be optimized', () => { @Component({ - standalone: true, template: ` @let foo = value + 1; @@ -333,7 +322,6 @@ describe('@let declarations', () => { it('should not be able to access @let declarations using a query', () => { @Component({ - standalone: true, template: ` @let value = 1; {{value}} @@ -355,12 +343,10 @@ describe('@let declarations', () => { @let value = 123; The value is {{value}} `, - standalone: true, }) class InnerComponent {} @Component({ - standalone: true, template: '', imports: [InnerComponent], }) @@ -379,12 +365,10 @@ describe('@let declarations', () => { Fallback content Fallback footer `, - standalone: true, }) class InnerComponent {} @Component({ - standalone: true, template: ` @let one = 1; @@ -408,7 +392,6 @@ describe('@let declarations', () => { it('should give precedence to @let declarations over component properties', () => { @Component({ - standalone: true, template: ` @let value = '@let'; @@ -428,7 +411,6 @@ describe('@let declarations', () => { it('should give precedence to local @let definition over one from a parent view', () => { @Component({ - standalone: true, template: ` @let value = 'parent'; @@ -447,7 +429,6 @@ describe('@let declarations', () => { it('should be able to use @for loop variables in @let declarations', () => { @Component({ - standalone: true, template: ` @for (value of values; track $index) { @let calculation = value * $index; diff --git a/packages/core/test/acceptance/listener_spec.ts b/packages/core/test/acceptance/listener_spec.ts index 7ee9ba3f76a..d5d2e72bac4 100644 --- a/packages/core/test/acceptance/listener_spec.ts +++ b/packages/core/test/acceptance/listener_spec.ts @@ -162,7 +162,7 @@ describe('event listeners', () => { - + `, standalone: false, @@ -187,7 +187,7 @@ describe('event listeners', () => { - + `, standalone: false, @@ -226,13 +226,11 @@ describe('event listeners', () => { it('should support local refs in listeners', () => { @Component({ selector: 'my-comp', - standalone: true, template: ``, }) class MyComp {} @Component({ - standalone: true, imports: [MyComp], template: ` @@ -768,7 +766,6 @@ describe('event listeners', () => { @Directive({ selector: '[hostListenerDir]', - standalone: true, }) class HostListenerDir { @HostListener('click') @@ -778,7 +775,6 @@ describe('event listeners', () => { } @Component({ - standalone: true, imports: [HostListenerDir], template: ``, }) @@ -801,7 +797,6 @@ describe('event listeners', () => { @Directive({ selector: '[hostListenerDir]', - standalone: true, }) class HostListenerDir { @HostListener('document:click') @@ -811,7 +806,6 @@ describe('event listeners', () => { } @Component({ - standalone: true, imports: [HostListenerDir], template: ``, }) @@ -883,7 +877,7 @@ describe('event listeners', () => { - + `, standalone: false, diff --git a/packages/core/test/acceptance/ng_module_spec.ts b/packages/core/test/acceptance/ng_module_spec.ts index 75f04290f43..b64bb6cd2d5 100644 --- a/packages/core/test/acceptance/ng_module_spec.ts +++ b/packages/core/test/acceptance/ng_module_spec.ts @@ -98,7 +98,6 @@ describe('NgModule', () => { it('should throw when a standalone component is added to NgModule declarations', () => { @Component({ selector: 'my-comp', - standalone: true, template: '', }) class MyComp {} @@ -120,7 +119,6 @@ describe('NgModule', () => { it('should throw when a standalone directive is added to NgModule declarations', () => { @Directive({ selector: '[my-dir]', - standalone: true, }) class MyDir {} @@ -148,7 +146,6 @@ describe('NgModule', () => { it('should throw when a standalone pipe is added to NgModule declarations', () => { @Pipe({ name: 'my-pipe', - standalone: true, }) class MyPipe {} @@ -177,7 +174,6 @@ describe('NgModule', () => { @Component({ selector: 'my-comp', template: '', - standalone: true, }) class MyComp {} @@ -443,7 +439,6 @@ describe('NgModule', () => { it('should log an error about unknown element for a standalone component without CUSTOM_ELEMENTS_SCHEMA', () => { @Component({ template: ``, - standalone: true, }) class MyComp {} @@ -457,7 +452,6 @@ describe('NgModule', () => { it('should not log an error about unknown element for a standalone component with CUSTOM_ELEMENTS_SCHEMA', () => { @Component({ template: ``, - standalone: true, schemas: [CUSTOM_ELEMENTS_SCHEMA], }) class MyComp {} @@ -657,7 +651,6 @@ describe('NgModule', () => { `is used in a template, but not imported in a standalone component`, () => { @Component({ - standalone: true, template: `
`, }) class App { diff --git a/packages/core/test/acceptance/pipe_spec.ts b/packages/core/test/acceptance/pipe_spec.ts index 8376db2f183..1639cdb856c 100644 --- a/packages/core/test/acceptance/pipe_spec.ts +++ b/packages/core/test/acceptance/pipe_spec.ts @@ -354,7 +354,7 @@ describe('pipe', () => { } // The generated code corresponds to the following decorator: - // @Pipe({name: 'sayHello', pure: true, standalone: true}) + // @Pipe({name: 'sayHello', pure: true}) class SayHelloPipe extends ParentPipe implements PipeTransform { transform() { return this.sayHelloService.getHello(); @@ -369,7 +369,6 @@ describe('pipe', () => { } @Component({ - standalone: true, selector: 'app', template: '{{ value | sayHello }}', imports: [SayHelloPipe], diff --git a/packages/core/test/acceptance/query_spec.ts b/packages/core/test/acceptance/query_spec.ts index fbfbdd05ed5..055bb4de2eb 100644 --- a/packages/core/test/acceptance/query_spec.ts +++ b/packages/core/test/acceptance/query_spec.ts @@ -886,14 +886,12 @@ describe('query logic', () => { it('should not match directive host with content queries', () => { @Directive({ selector: '[content-query]', - standalone: true, }) class ContentQueryDirective { @ContentChildren('foo', {descendants: true}) foos!: QueryList; } @Component({ - standalone: true, imports: [ContentQueryDirective], template: `
`, }) @@ -910,13 +908,12 @@ describe('query logic', () => { }); it('should report results to appropriate queries where deep content queries are nested', () => { - @Directive({selector: '[content-query]', standalone: true, exportAs: 'query'}) + @Directive({selector: '[content-query]', exportAs: 'query'}) class ContentQueryDirective { @ContentChildren('foo, bar, baz', {descendants: true}) qlist!: QueryList; } @Component({ - standalone: true, imports: [ContentQueryDirective], template: `
@@ -944,13 +941,12 @@ describe('query logic', () => { }); it('should support nested shallow content queries', () => { - @Directive({selector: '[content-query]', standalone: true, exportAs: 'query'}) + @Directive({selector: '[content-query]', exportAs: 'query'}) class ContentQueryDirective { @ContentChildren('foo') qlist!: QueryList; } @Component({ - standalone: true, imports: [ContentQueryDirective], template: `
@@ -976,18 +972,17 @@ describe('query logic', () => { }); it('should respect shallow flag on content queries when mixing deep and shallow queries', () => { - @Directive({selector: '[shallow-content-query]', standalone: true, exportAs: 'shallow-query'}) + @Directive({selector: '[shallow-content-query]', exportAs: 'shallow-query'}) class ShallowContentQueryDirective { @ContentChildren('foo') qlist!: QueryList; } - @Directive({selector: '[deep-content-query]', standalone: true, exportAs: 'deep-query'}) + @Directive({selector: '[deep-content-query]', exportAs: 'deep-query'}) class DeepContentQueryDirective { @ContentChildren('foo', {descendants: true}) qlist!: QueryList; } @Component({ - standalone: true, imports: [ShallowContentQueryDirective, DeepContentQueryDirective], template: `
@@ -1014,7 +1009,7 @@ describe('query logic', () => { }); it('should support shallow ContentChild queries', () => { - @Directive({selector: '[query-dir]', standalone: true}) + @Directive({selector: '[query-dir]'}) class ContentQueryDirective { @ContentChild('foo', {descendants: false}) shallow: ElementRef | undefined; // ContentChild queries have {descendants: true} option by default @@ -1022,7 +1017,6 @@ describe('query logic', () => { } @Component({ - standalone: true, imports: [ContentQueryDirective], template: `
@@ -1046,14 +1040,12 @@ describe('query logic', () => { it('should support view and content queries matching the same element', () => { @Directive({ selector: '[content-query]', - standalone: true, }) class ContentQueryDirective { @ContentChildren('foo') foos!: QueryList; } @Component({ - standalone: true, imports: [ContentQueryDirective], template: `
@@ -1082,14 +1074,13 @@ describe('query logic', () => { }); describe('query order', () => { - @Directive({selector: '[text]', standalone: true}) + @Directive({selector: '[text]'}) class TextDirective { @Input() text: string | undefined; } it('should register view query matches from top to bottom', () => { @Component({ - standalone: true, imports: [TextDirective], template: ` @@ -1119,14 +1110,12 @@ describe('query logic', () => { it('should register content query matches from top to bottom', () => { @Directive({ selector: '[content-query]', - standalone: true, }) class ContentQueryDirective { @ContentChildren(TextDirective, {descendants: true}) texts!: QueryList; } @Component({ - standalone: true, imports: [TextDirective, ContentQueryDirective], template: `
@@ -1475,15 +1464,14 @@ describe('query logic', () => { }); describe('read option', () => { - @Directive({selector: '[child]', standalone: true}) + @Directive({selector: '[child]'}) class Child {} - @Directive({selector: '[otherChild]', standalone: true}) + @Directive({selector: '[otherChild]'}) class OtherChild {} it('should query using type predicate and read ElementRef', () => { @Component({ - standalone: true, imports: [Child], template: `
`, }) @@ -1503,7 +1491,6 @@ describe('query logic', () => { it('should query using type predicate and read another directive type', () => { @Component({ - standalone: true, imports: [Child, OtherChild], template: `
`, }) @@ -1521,7 +1508,6 @@ describe('query logic', () => { it('should not add results to query if a requested token cant be read', () => { @Component({ - standalone: true, imports: [Child], template: `
`, }) @@ -1538,7 +1524,6 @@ describe('query logic', () => { it('should query using local ref and read ElementRef by default', () => { @Component({ - standalone: true, template: `
@@ -1560,7 +1545,6 @@ describe('query logic', () => { it('should query for multiple elements and read ElementRef by default', () => { @Component({ - standalone: true, template: `
@@ -1584,7 +1568,6 @@ describe('query logic', () => { it('should read ElementRef from an element when explicitly asked for', () => { @Component({ - standalone: true, template: `
@@ -1606,7 +1589,6 @@ describe('query logic', () => { it('should query for and read ElementRef with a native element pointing to comment node', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1623,7 +1605,6 @@ describe('query logic', () => { it('should query for and read ElementRef without explicit read option', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1640,7 +1621,6 @@ describe('query logic', () => { it('should read ViewContainerRef from element nodes when explicitly asked for', () => { @Component({ - standalone: true, template: `
`, }) class TestCmp { @@ -1657,7 +1637,6 @@ describe('query logic', () => { it('should read ViewContainerRef from ng-template nodes when explicitly asked for', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1674,7 +1653,6 @@ describe('query logic', () => { it('should read ElementRef with a native element pointing to comment DOM node from ng-template', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1691,7 +1669,6 @@ describe('query logic', () => { it('should read TemplateRef from ng-template by default', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1708,7 +1685,6 @@ describe('query logic', () => { it('should read TemplateRef from ng-template when explicitly asked for', () => { @Component({ - standalone: true, template: ``, }) class TestCmp { @@ -1724,11 +1700,10 @@ describe('query logic', () => { }); it('should read component instance if element queried for is a component host', () => { - @Component({selector: 'child-cmp', standalone: true, template: ''}) + @Component({selector: 'child-cmp', template: ''}) class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1748,13 +1723,11 @@ describe('query logic', () => { @Component({ selector: 'child-cmp', exportAs: 'child', - standalone: true, template: '', }) class ChildCmp {} @Component({ - standalone: true, imports: [ChildCmp], template: ``, }) @@ -1771,11 +1744,10 @@ describe('query logic', () => { }); it('should read directive instance if element queried for has an exported directive with a matching name', () => { - @Directive({selector: '[child]', exportAs: 'child', standalone: true}) + @Directive({selector: '[child]', exportAs: 'child'}) class ChildDirective {} @Component({ - standalone: true, imports: [ChildDirective], template: `
`, }) @@ -1792,14 +1764,13 @@ describe('query logic', () => { }); it('should read all matching directive instances from a given element', () => { - @Directive({selector: '[child1]', exportAs: 'child1', standalone: true}) + @Directive({selector: '[child1]', exportAs: 'child1'}) class Child1Dir {} - @Directive({selector: '[child2]', exportAs: 'child2', standalone: true}) + @Directive({selector: '[child2]', exportAs: 'child2'}) class Child2Dir {} @Component({ - standalone: true, imports: [Child1Dir, Child2Dir], template: `
`, }) @@ -1817,11 +1788,10 @@ describe('query logic', () => { }); it('should read multiple locals exporting the same directive from a given element', () => { - @Directive({selector: '[child]', exportAs: 'child', standalone: true}) + @Directive({selector: '[child]', exportAs: 'child'}) class ChildDir {} @Component({ - standalone: true, imports: [ChildDir], template: `
`, }) @@ -1869,11 +1839,10 @@ describe('query logic', () => { }); it('should match on exported directive name and read a requested token', () => { - @Directive({selector: '[child]', exportAs: 'child', standalone: true}) + @Directive({selector: '[child]', exportAs: 'child'}) class ChildDir {} @Component({ - standalone: true, imports: [ChildDir], template: `
`, }) @@ -1890,11 +1859,10 @@ describe('query logic', () => { }); it('should support reading a mix of ElementRef and directive instances', () => { - @Directive({selector: '[child]', exportAs: 'child', standalone: true}) + @Directive({selector: '[child]', exportAs: 'child'}) class ChildDir {} @Component({ - standalone: true, imports: [ChildDir], template: `
`, }) @@ -1912,11 +1880,10 @@ describe('query logic', () => { }); it('should not add results to selector-based query if a requested token cant be read', () => { - @Directive({selector: '[child]', standalone: true}) + @Directive({selector: '[child]'}) class ChildDir {} @Component({ - standalone: true, imports: [], template: `
`, }) @@ -1932,14 +1899,13 @@ describe('query logic', () => { }); it('should not add results to directive-based query if only read token matches', () => { - @Directive({selector: '[child]', standalone: true}) + @Directive({selector: '[child]'}) class ChildDir {} - @Directive({selector: '[otherChild]', standalone: true}) + @Directive({selector: '[otherChild]'}) class OtherChildDir {} @Component({ - standalone: true, imports: [Child], template: `
`, }) @@ -1956,7 +1922,6 @@ describe('query logic', () => { it('should not add results to TemplateRef-based query if only read token matches', () => { @Component({ - standalone: true, template: `
`, }) class TestCmp { @@ -1972,7 +1937,6 @@ describe('query logic', () => { it('should not add results to the query in case no match found (via TemplateRef)', () => { @Component({ - standalone: true, template: `
`, }) class TestCmp { @@ -1988,7 +1952,6 @@ describe('query logic', () => { it('should query templates if the type is TemplateRef (and respect "read" option)', () => { @Component({ - standalone: true, template: `
Test
Test
@@ -2015,7 +1978,6 @@ describe('query logic', () => { it('should match using string selector and directive as a read argument', () => { @Component({ - standalone: true, imports: [Child], template: `
`, }) diff --git a/packages/core/test/acceptance/renderer_factory_spec.ts b/packages/core/test/acceptance/renderer_factory_spec.ts index b907a6a6374..8d2bf0161dd 100644 --- a/packages/core/test/acceptance/renderer_factory_spec.ts +++ b/packages/core/test/acceptance/renderer_factory_spec.ts @@ -134,7 +134,6 @@ describe('renderer factory lifecycle', () => { it('should pass in the component styles directly into the underlying renderer', () => { @Component({ - standalone: true, styles: ['.some-css-class { color: red; }'], template: '...', encapsulation: ViewEncapsulation.ShadowDom, @@ -153,7 +152,6 @@ describe('renderer factory lifecycle', () => { const animB = {name: 'b'}; @Component({ - standalone: true, template: '', animations: [animA, animB], }) @@ -170,7 +168,6 @@ describe('renderer factory lifecycle', () => { it('should include animations in the renderType data array even if the array is empty', () => { @Component({ - standalone: true, template: '...', animations: [], }) @@ -184,7 +181,6 @@ describe('renderer factory lifecycle', () => { it('should allow [@trigger] bindings to be picked up by the underlying renderer', () => { @Component({ - standalone: true, template: '
', animations: [], }) @@ -216,7 +212,6 @@ describe('renderer factory lifecycle', () => { it('should not invoke renderer destroy method for embedded views', () => { @Component({ selector: 'comp', - standalone: true, imports: [CommonModule], template: `
Root view
diff --git a/packages/core/test/acceptance/security_spec.ts b/packages/core/test/acceptance/security_spec.ts index 903751a6402..6038e8181c4 100644 --- a/packages/core/test/acceptance/security_spec.ts +++ b/packages/core/test/acceptance/security_spec.ts @@ -140,7 +140,6 @@ describe('iframe processing', () => { `as a static attribute (checking \`${securityAttr}\`)`, () => { @Component({ - standalone: true, selector: 'my-comp', template: ` `, }) @@ -194,7 +191,6 @@ describe('iframe processing', () => { `using a property interpolation (checking \`${securityAttr}\`)`, () => { @Component({ - standalone: true, selector: 'my-comp', template: ``, }) @@ -210,7 +206,6 @@ describe('iframe processing', () => { `sure it's case-insensitive)`, () => { @Component({ - standalone: true, selector: 'my-comp', template: ` ', @@ -323,7 +313,6 @@ describe('iframe processing', () => { it('should work when a directive sets a security-sensitive host attribute on a non-iframe element', () => { @Directive({ - standalone: true, selector: '[dir]', host: { 'src': TEST_IFRAME_URL, @@ -333,7 +322,6 @@ describe('iframe processing', () => { class Dir {} @Component({ - standalone: true, imports: [Dir], selector: 'my-comp', template: '', @@ -351,7 +339,6 @@ describe('iframe processing', () => { 'which also has a structural directive (*ngIf)', () => { @Component({ - standalone: true, imports: [NgIf], selector: 'my-comp', template: ``, @@ -366,7 +353,6 @@ describe('iframe processing', () => { it('should work when a security-sensitive attribute is set between `src` and `srcdoc`', () => { @Component({ - standalone: true, selector: 'my-comp', template: ``, }) @@ -377,7 +363,6 @@ describe('iframe processing', () => { it('should work when a directive sets a security-sensitive attribute before setting `src`', () => { @Directive({ - standalone: true, selector: '[dir]', host: { 'sandbox': '', @@ -387,7 +372,6 @@ describe('iframe processing', () => { class IframeDir {} @Component({ - standalone: true, imports: [IframeDir], selector: 'my-comp', template: '', @@ -403,7 +387,6 @@ describe('iframe processing', () => { '(directive attribute after `sandbox`)', () => { @Directive({ - standalone: true, selector: '[dir]', host: { 'src': TEST_IFRAME_URL, @@ -412,7 +395,6 @@ describe('iframe processing', () => { class IframeDir {} @Component({ - standalone: true, imports: [IframeDir], selector: 'my-comp', template: '', @@ -428,7 +410,6 @@ describe('iframe processing', () => { "as an attribute binding (checking that it's case-insensitive)", () => { @Directive({ - standalone: true, selector: '[dir]', host: { '[attr.SANDBOX]': "''", @@ -437,7 +418,6 @@ describe('iframe processing', () => { class IframeDir {} @Component({ - standalone: true, imports: [IframeDir], selector: 'my-comp', template: ``, @@ -454,7 +434,6 @@ describe('iframe processing', () => { '(directive attribute before `sandbox`)', () => { @Directive({ - standalone: true, selector: '[dir]', host: { 'src': TEST_IFRAME_URL, @@ -463,7 +442,6 @@ describe('iframe processing', () => { class IframeDir {} @Component({ - standalone: true, imports: [IframeDir], selector: 'my-comp', template: '', @@ -480,7 +458,6 @@ describe('iframe processing', () => { '(directive attribute after `src`)', () => { @Directive({ - standalone: true, selector: '[dir]', host: { 'sandbox': '', @@ -489,7 +466,6 @@ describe('iframe processing', () => { class IframeDir {} @Component({ - standalone: true, imports: [IframeDir], selector: 'my-comp', template: ``, @@ -502,7 +478,6 @@ describe('iframe processing', () => { it('should work when a security-sensitive attribute is set as a static attribute', () => { @Component({ - standalone: true, selector: 'my-comp', template: ` @@ -521,7 +496,6 @@ describe('iframe processing', () => { 'as a property binding and an `, @@ -568,7 +540,6 @@ describe('iframe processing', () => { 'before the directive that sets an `src` attribute value', () => { @Directive({ - standalone: true, selector: '[set-src]', host: { 'src': TEST_IFRAME_URL, @@ -577,7 +548,6 @@ describe('iframe processing', () => { class DirThatSetsSrc {} @Directive({ - standalone: true, selector: '[set-sandbox]', host: { 'sandbox': '', @@ -586,7 +556,6 @@ describe('iframe processing', () => { class DirThatSetsSandbox {} @Component({ - standalone: true, imports: [DirThatSetsSandbox, DirThatSetsSrc], selector: 'my-comp', // Important note: even though the `set-sandbox` goes after the `set-src`, @@ -605,7 +574,6 @@ describe('iframe processing', () => { 'a host directive that sets an `src` attribute value', () => { @Directive({ - standalone: true, selector: '[set-src-dir]', host: { 'src': TEST_IFRAME_URL, @@ -614,7 +582,6 @@ describe('iframe processing', () => { class DirThatSetsSrc {} @Directive({ - standalone: true, selector: '[dir]', hostDirectives: [DirThatSetsSrc], host: { @@ -624,7 +591,6 @@ describe('iframe processing', () => { class DirThatSetsSandbox {} @Component({ - standalone: true, imports: [DirThatSetsSandbox], selector: 'my-comp', template: '', @@ -640,7 +606,6 @@ describe('iframe processing', () => { 'a host directive that sets a security-sensitive attribute value', () => { @Directive({ - standalone: true, selector: '[set-sandbox-dir]', host: { 'sandbox': '', @@ -649,7 +614,6 @@ describe('iframe processing', () => { class DirThatSetsSandbox {} @Directive({ - standalone: true, selector: '[dir]', hostDirectives: [DirThatSetsSandbox], host: { @@ -659,7 +623,6 @@ describe('iframe processing', () => { class DirThatSetsSrc {} @Component({ - standalone: true, imports: [DirThatSetsSrc], selector: 'my-comp', template: '', @@ -675,7 +638,6 @@ describe('iframe processing', () => { 'with security-sensitive attributes set via property bindings', () => { @Component({ - standalone: true, selector: 'my-comp', template: ` @@ -711,7 +673,6 @@ describe('iframe processing', () => { 'a property binding on an