diff --git a/apps/angular/31-module-to-standalone/src/app/app.component.ts b/apps/angular/31-module-to-standalone/src/app/app.component.ts
index 95eeab5b9..7cda58f92 100644
--- a/apps/angular/31-module-to-standalone/src/app/app.component.ts
+++ b/apps/angular/31-module-to-standalone/src/app/app.component.ts
@@ -1,7 +1,10 @@
import { Component } from '@angular/core';
+import { RouterLink, RouterOutlet } from '@angular/router';
@Component({
selector: 'app-root',
+ standalone: true,
+ imports: [RouterOutlet, RouterLink],
template: `
-
+
+
`,
host: {
class: 'flex flex-col p-4 gap-3',
diff --git a/apps/angular/31-module-to-standalone/src/app/app.module.ts b/apps/angular/31-module-to-standalone/src/app/app.module.ts
deleted file mode 100644
index c795a11b9..000000000
--- a/apps/angular/31-module-to-standalone/src/app/app.module.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { MainShellModule } from '@angular-challenges/module-to-standalone/shell';
-import { NgModule } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser';
-import { AppComponent } from './app.component';
-
-@NgModule({
- declarations: [AppComponent],
- imports: [BrowserModule, MainShellModule],
- bootstrap: [AppComponent],
-})
-export class AppModule {}
diff --git a/apps/angular/31-module-to-standalone/src/main.ts b/apps/angular/31-module-to-standalone/src/main.ts
index 16de2365d..07b6567f0 100644
--- a/apps/angular/31-module-to-standalone/src/main.ts
+++ b/apps/angular/31-module-to-standalone/src/main.ts
@@ -1,6 +1,9 @@
-import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
-import { AppModule } from './app/app.module';
+import { provideToken } from '@angular-challenges/module-to-standalone/core/providers';
+import { appRoutes } from '@angular-challenges/module-to-standalone/shell';
+import { bootstrapApplication } from '@angular/platform-browser';
+import { provideRouter } from '@angular/router';
+import { AppComponent } from './app/app.component';
-platformBrowserDynamic()
- .bootstrapModule(AppModule)
- .catch((err) => console.error(err));
+bootstrapApplication(AppComponent, {
+ providers: [provideRouter(appRoutes), provideToken('main-shell-token')],
+}).catch((err) => console.error(err));
diff --git a/libs/module-to-standalone/admin/feature/src/index.ts b/libs/module-to-standalone/admin/feature/src/index.ts
index 76c8330f9..799b7a973 100644
--- a/libs/module-to-standalone/admin/feature/src/index.ts
+++ b/libs/module-to-standalone/admin/feature/src/index.ts
@@ -1 +1 @@
-export * from './lib/admin-feature.module';
+export { ADMIN_ROUTES } from './lib/admin-feature.routes';
diff --git a/libs/module-to-standalone/admin/feature/src/lib/admin-feature.module.ts b/libs/module-to-standalone/admin/feature/src/lib/admin-feature.module.ts
deleted file mode 100644
index 84e893eeb..000000000
--- a/libs/module-to-standalone/admin/feature/src/lib/admin-feature.module.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { CommonModule } from '@angular/common';
-import { NgModule } from '@angular/core';
-import { RouterModule } from '@angular/router';
-
-@NgModule({
- declarations: [],
- imports: [
- CommonModule,
- RouterModule.forChild([
- {
- path: '',
- loadChildren: () =>
- import('./dashboard/dashboard.component').then(
- (m) => m.DashboardModule,
- ),
- },
- {
- path: 'create-user',
- loadChildren: () =>
- import('./create-user/create-user.component').then(
- (m) => m.CreateUserModule,
- ),
- },
- ]),
- ],
-})
-export class AdminFeatureModule {}
diff --git a/libs/module-to-standalone/admin/feature/src/lib/admin-feature.routes.ts b/libs/module-to-standalone/admin/feature/src/lib/admin-feature.routes.ts
new file mode 100644
index 000000000..9a6115a38
--- /dev/null
+++ b/libs/module-to-standalone/admin/feature/src/lib/admin-feature.routes.ts
@@ -0,0 +1,18 @@
+import { Routes } from '@angular/router';
+
+export const ADMIN_ROUTES: Routes = [
+ {
+ path: '',
+ loadComponent: () =>
+ import('./dashboard/dashboard.component').then(
+ (m) => m.DashboardComponent,
+ ),
+ },
+ {
+ path: 'create-user',
+ loadComponent: () =>
+ import('./create-user/create-user.component').then(
+ (m) => m.CreateUserComponent,
+ ),
+ },
+];
diff --git a/libs/module-to-standalone/admin/feature/src/lib/create-user/create-user.component.ts b/libs/module-to-standalone/admin/feature/src/lib/create-user/create-user.component.ts
index e3670935c..6b28ee2db 100644
--- a/libs/module-to-standalone/admin/feature/src/lib/create-user/create-user.component.ts
+++ b/libs/module-to-standalone/admin/feature/src/lib/create-user/create-user.component.ts
@@ -1,11 +1,12 @@
-import { Component, NgModule } from '@angular/core';
-import { RouterModule } from '@angular/router';
+import { Component } from '@angular/core';
+import { RouterLink } from '@angular/router';
@Component({
selector: 'lib-create-user',
+ standalone: true,
+ imports: [RouterLink],
template: `
Create User Form
-