From: Kai Moritz Date: Thu, 18 Sep 2025 20:23:50 +0000 (+0200) Subject: refactor: Aligned structure & code with a new 20.3.1-project -- MOVE X-Git-Tag: jest--2025-10-04--09-27~13 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=b484b183def48e31c6cfc5b672225e123c071c32;p=demos%2Fkafka%2Fchat refactor: Aligned structure & code with a new 20.3.1-project -- MOVE --- diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 00000000..997406ad 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 index 2e3a20f5..00000000 --- a/src/app/app-routing.module.ts +++ /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 index 00000000..0f5834c1 --- /dev/null +++ b/src/app/app.config.ts @@ -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 index 00000000..2e3a20f5 --- /dev/null +++ b/src/app/app.routes.ts @@ -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 index e69de29b..00000000 diff --git a/src/favicon.ico b/src/favicon.ico deleted file mode 100644 index 997406ad..00000000 Binary files a/src/favicon.ico and /dev/null differ