From 64463d3e2f7a0bcd0f8cba03687f4ca2a5490a4c Mon Sep 17 00:00:00 2001 From: Giuseppe Lomasto Date: Mon, 9 Dec 2024 21:47:32 +0100 Subject: [PATCH] feat: migrate to standalone component --- .../src/app/app.component.ts | 3 + .../src/app/app.module.ts | 11 ---- .../31-module-to-standalone/src/main.ts | 13 +++-- .../admin/feature/src/index.ts | 2 +- .../feature/src/lib/admin-feature.module.ts | 27 --------- .../feature/src/lib/admin-feature.routes.ts | 20 +++++++ .../lib/create-user/create-user.component.ts | 14 ++--- .../src/lib/dashboard/dashboard.component.ts | 14 ++--- .../forbidden/src/index.ts | 2 +- .../forbidden/src/lib/forbidden.component.ts | 3 +- .../forbidden/src/lib/forbidden.module.ts | 13 ----- libs/module-to-standalone/home/src/index.ts | 2 +- .../home/src/lib/home.component.ts | 5 +- .../home/src/lib/home.module.ts | 13 ----- libs/module-to-standalone/shell/src/index.ts | 4 +- .../shell/src/lib/main-shell.module.ts | 11 ---- .../shell/src/lib/main-shell.routes.ts | 58 +++++++++---------- .../user/contact/src/index.ts | 2 +- .../contact/src/lib/contact-feature.module.ts | 27 --------- .../user/contact/src/lib/contact.routes.ts | 20 +++++++ .../create-contact.component.ts | 14 ++--- .../src/lib/dashboard/dashboard.component.ts | 14 ++--- .../user/home/src/index.ts | 2 +- .../user/home/src/lib/home.component.ts | 3 +- .../user/home/src/lib/home.module.ts | 11 ---- .../user/shell/src/index.ts | 2 +- .../shell/src/lib/user-shell.component.ts | 3 + .../user/shell/src/lib/user-shell.module.ts | 13 ----- .../user/shell/src/lib/user-shell.routes.ts | 12 ++-- 29 files changed, 121 insertions(+), 217 deletions(-) delete mode 100644 apps/angular/31-module-to-standalone/src/app/app.module.ts delete mode 100644 libs/module-to-standalone/admin/feature/src/lib/admin-feature.module.ts create mode 100644 libs/module-to-standalone/admin/feature/src/lib/admin-feature.routes.ts delete mode 100644 libs/module-to-standalone/forbidden/src/lib/forbidden.module.ts delete mode 100644 libs/module-to-standalone/home/src/lib/home.module.ts delete mode 100644 libs/module-to-standalone/shell/src/lib/main-shell.module.ts delete mode 100644 libs/module-to-standalone/user/contact/src/lib/contact-feature.module.ts create mode 100644 libs/module-to-standalone/user/contact/src/lib/contact.routes.ts delete mode 100644 libs/module-to-standalone/user/home/src/lib/home.module.ts delete mode 100644 libs/module-to-standalone/user/shell/src/lib/user-shell.module.ts 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..a11252a81 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: [RouterLink, RouterOutlet], template: `