Skip to content

Commit 9c71b96

Browse files
fix: move standalone components from declarations to imports
- Move all standalone components to imports array in AppModule - Move LazyModuleComponent to imports in LazyModuleModule - Empty declarations arrays since all components are now standalone
1 parent b8b0c2d commit 9c71b96

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

projects/playground/src/app/app.module.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,19 @@ const configInitializer =
3535
.then((loadedConfig: any) => config.set(loadedConfig)); // Set the config that was loaded asynchronously here
3636

3737
@NgModule({
38-
declarations: [
39-
AppComponent,
40-
ProtectedComponent,
41-
UnprotectedComponent,
42-
ChildRouteComponent,
43-
NestedChildRouteComponent,
44-
ErrorComponent,
45-
],
38+
declarations: [],
4639
bootstrap: [AppComponent],
4740
imports: [
4841
BrowserModule,
4942
AppRoutingModule,
5043
ReactiveFormsModule,
51-
// This playground has been configured by default to use dynamic configuration.
52-
// If you wish to specify configuration to `forRoot` directly, uncomment `authConfig`
53-
// here, and comment out the APP_INITIALIZER config in the providers array below.
5444
AuthModule.forRoot(/* authConfig */),
45+
AppComponent,
46+
ProtectedComponent,
47+
UnprotectedComponent,
48+
ChildRouteComponent,
49+
NestedChildRouteComponent,
50+
ErrorComponent,
5551
],
5652
providers: [
5753
{

projects/playground/src/app/lazy-module.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { LazyModuleRoutingModule } from './lazy-module-routing.module';
55
import { LazyModuleComponent } from './components/lazy-module.component';
66

77
@NgModule({
8-
declarations: [LazyModuleComponent],
9-
imports: [CommonModule, LazyModuleRoutingModule],
8+
declarations: [],
9+
imports: [CommonModule, LazyModuleRoutingModule, LazyModuleComponent],
1010
})
1111
export class LazyModuleModule {}

0 commit comments

Comments
 (0)