]> juplo.de Git - demos/kafka/chat/commitdiff
refactor: Aligned structure & code with a new 20.3.1-project -- MOVE
authorKai Moritz <kai@juplo.de>
Thu, 18 Sep 2025 20:23:50 +0000 (22:23 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 19 Sep 2025 11:00:59 +0000 (13:00 +0200)
public/favicon.ico [new file with mode: 0644]
src/app/app-routing.module.ts [deleted file]
src/app/app.config.ts [new file with mode: 0644]
src/app/app.routes.ts [new file with mode: 0644]
src/assets/.gitkeep [deleted file]
src/favicon.ico [deleted file]

diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644 (file)
index 0000000..997406a
Binary files /dev/null and b/public/favicon.ico differ
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
deleted file mode 100644 (file)
index 2e3a20f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-import { NgModule } from '@angular/core';
-import { RouterModule, Routes } from '@angular/router';
-import { UserComponent } from "./user/user.component";
-import { ChatroomsComponent } from "./chatrooms/chatrooms.component";
-import { ChatroomComponent } from "./chatroom/chatroom.component";
-
-const routes: Routes = [
-  { path: 'user', component: UserComponent },
-  { path: 'chatrooms', component: ChatroomsComponent },
-  { path: 'chatroom/:shard/:id', component: ChatroomComponent },
-  { path: '', redirectTo: '/user', pathMatch: 'full' },
-];
-
-@NgModule({
-  imports: [RouterModule.forRoot(routes)],
-  exports: [RouterModule]
-})
-export class AppRoutingModule { }
diff --git a/src/app/app.config.ts b/src/app/app.config.ts
new file mode 100644 (file)
index 0000000..0f5834c
--- /dev/null
@@ -0,0 +1,23 @@
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+
+import { importProvidersFrom } from '@angular/core';
+import { AppComponent } from './app/app.component';
+import { AppRoutes } from './app/app.routes';
+import { withInterceptorsFromDi, provideHttpClient } from '@angular/common/http';
+import { ReactiveFormsModule } from '@angular/forms';
+import { BrowserModule, bootstrapApplication } from '@angular/platform-browser';
+
+
+bootstrapApplication(AppComponent, {
+  providers: [
+    importProvidersFrom(
+      BrowserModule,
+      ReactiveFormsModule,
+      AppRoutes,
+    ),
+    provideHttpClient(
+      withInterceptorsFromDi(),
+    )
+  ]})
+  .catch(err => console.error(err));
diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts
new file mode 100644 (file)
index 0000000..2e3a20f
--- /dev/null
@@ -0,0 +1,18 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { UserComponent } from "./user/user.component";
+import { ChatroomsComponent } from "./chatrooms/chatrooms.component";
+import { ChatroomComponent } from "./chatroom/chatroom.component";
+
+const routes: Routes = [
+  { path: 'user', component: UserComponent },
+  { path: 'chatrooms', component: ChatroomsComponent },
+  { path: 'chatroom/:shard/:id', component: ChatroomComponent },
+  { path: '', redirectTo: '/user', pathMatch: 'full' },
+];
+
+@NgModule({
+  imports: [RouterModule.forRoot(routes)],
+  exports: [RouterModule]
+})
+export class AppRoutingModule { }
diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/favicon.ico b/src/favicon.ico
deleted file mode 100644 (file)
index 997406a..0000000
Binary files a/src/favicon.ico and /dev/null differ