Skip to content

Commit cdaa8c7

Browse files
committed
refactor(common): remove unused imports and standalone: false from examples
Cleans up example code by removing explicit `standalone: false`, since standalone components are the default and recommended approach.
1 parent 69da639 commit cdaa8c7

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

adev/src/content/best-practices/a11y.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ The following example shows how to make a progress bar accessible by using host
9999
path="adev/src/content/examples/accessibility/src/app/progress-bar.component.ts"
100100
language="ts"
101101
linenums
102-
highlight="[12, 20]"/>
102+
highlight="[12, 19]"/>
103103
<docs-code
104104
path="adev/src/content/examples/accessibility/src/app/app.component.html"
105105
language="html"

packages/examples/core/ts/metadata/lifecycle_hooks_spec.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {TestBed} from '@angular/core/testing';
2929
@Component({
3030
selector: 'my-cmp',
3131
template: `...`,
32-
standalone: false,
3332
})
3433
class MyComponent implements OnInit {
3534
ngOnInit() {
@@ -46,7 +45,6 @@ import {TestBed} from '@angular/core/testing';
4645
@Component({
4746
selector: 'my-cmp',
4847
template: `...`,
49-
standalone: false,
5048
})
5149
class MyComponent implements DoCheck {
5250
ngDoCheck() {
@@ -63,7 +61,6 @@ import {TestBed} from '@angular/core/testing';
6361
@Component({
6462
selector: 'my-cmp',
6563
template: `...`,
66-
standalone: false,
6764
})
6865
class MyComponent implements AfterContentChecked {
6966
ngAfterContentChecked() {
@@ -80,7 +77,6 @@ import {TestBed} from '@angular/core/testing';
8077
@Component({
8178
selector: 'my-cmp',
8279
template: `...`,
83-
standalone: false,
8480
})
8581
class MyComponent implements AfterContentInit {
8682
ngAfterContentInit() {
@@ -97,7 +93,6 @@ import {TestBed} from '@angular/core/testing';
9793
@Component({
9894
selector: 'my-cmp',
9995
template: `...`,
100-
standalone: false,
10196
})
10297
class MyComponent implements AfterViewChecked {
10398
ngAfterViewChecked() {
@@ -114,7 +109,6 @@ import {TestBed} from '@angular/core/testing';
114109
@Component({
115110
selector: 'my-cmp',
116111
template: `...`,
117-
standalone: false,
118112
})
119113
class MyComponent implements AfterViewInit {
120114
ngAfterViewInit() {
@@ -131,7 +125,6 @@ import {TestBed} from '@angular/core/testing';
131125
@Component({
132126
selector: 'my-cmp',
133127
template: `...`,
134-
standalone: false,
135128
})
136129
class MyComponent implements OnDestroy {
137130
ngOnDestroy() {
@@ -148,7 +141,6 @@ import {TestBed} from '@angular/core/testing';
148141
@Component({
149142
selector: 'my-cmp',
150143
template: `...`,
151-
standalone: false,
152144
})
153145
class MyComponent implements OnChanges {
154146
@Input() prop: number = 0;
@@ -175,12 +167,12 @@ import {TestBed} from '@angular/core/testing';
175167

176168
@Component({
177169
template: `<my-cmp ${inputBindings}></my-cmp>`,
178-
standalone: false,
170+
imports: [clazz],
179171
})
180172
class ParentComponent {}
181173

182174
const fixture = TestBed.configureTestingModule({
183-
declarations: [ParentComponent, clazz],
175+
imports: [ParentComponent],
184176
}).createComponent(ParentComponent);
185177
fixture.detectChanges();
186178
fixture.destroy();

0 commit comments

Comments
 (0)