diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts
index 1857377..274e737 100644
--- a/client/src/app/app.component.ts
+++ b/client/src/app/app.component.ts
@@ -1,9 +1,10 @@
import { Component } from '@angular/core';
+import { RouterOutlet } from '@angular/router';
@Component({
- selector: 'app-root',
- template: '',
- styles: [],
- standalone: false,
+ selector: 'app-root',
+ template: '',
+ styles: [],
+ imports: [RouterOutlet],
})
export class AppComponent {}
diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts
deleted file mode 100644
index 6d44769..0000000
--- a/client/src/app/app.module.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { ClipboardModule } from '@angular/cdk/clipboard';
-import { APP_BASE_HREF } from '@angular/common';
-import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
-import { NgModule } from '@angular/core';
-import { FormsModule } from '@angular/forms';
-import { BrowserModule } from '@angular/platform-browser';
-import { AddNewTorrentComponent } from './add-new-torrent/add-new-torrent.component';
-import { AppRoutingModule } from './app-routing.module';
-import { AppComponent } from './app.component';
-import { AuthInterceptor } from './auth.interceptor';
-import { DecodeURIPipe } from './decode-uri.pipe';
-import { DownloadStatusPipe } from './download-status.pipe';
-import { LoginComponent } from './login/login.component';
-import { MainLayoutComponent } from './main-layout/main-layout.component';
-import { NavbarComponent } from './navbar/navbar.component';
-import { Nl2BrPipe } from './nl2br.pipe';
-import { ProfileComponent } from './profile/profile.component';
-import { SettingsComponent } from './settings/settings.component';
-import { SetupComponent } from './setup/setup.component';
-import { TorrentStatusPipe } from './torrent-status.pipe';
-import { TorrentTableComponent } from './torrent-table/torrent-table.component';
-import { TorrentComponent } from './torrent/torrent.component';
-import { SortPipe } from './sort.pipe';
-import { FileSizePipe } from './filesize.pipe';
-
-@NgModule({
- declarations: [AppComponent],
- bootstrap: [AppComponent],
- imports: [BrowserModule, AppRoutingModule, FormsModule, ClipboardModule, MainLayoutComponent,
- NavbarComponent,
- AddNewTorrentComponent,
- TorrentTableComponent,
- SettingsComponent,
- TorrentStatusPipe,
- DownloadStatusPipe,
- LoginComponent,
- SetupComponent,
- TorrentComponent,
- DecodeURIPipe,
- ProfileComponent,
- Nl2BrPipe,
- SortPipe,
- FileSizePipe],
- providers: [
- FileSizePipe,
- { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
- { provide: APP_BASE_HREF, useValue: (window as any)['_app_base'] || '/' },
- provideHttpClient(withInterceptorsFromDi()),
- ],
-})
-export class AppModule {}
diff --git a/client/src/main.ts b/client/src/main.ts
index d9a2e7e..a12f570 100644
--- a/client/src/main.ts
+++ b/client/src/main.ts
@@ -1,13 +1,29 @@
-import { enableProdMode } from '@angular/core';
+import { enableProdMode, importProvidersFrom } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
-import { AppModule } from './app/app.module';
+
import { environment } from './environments/environment';
+import { FileSizePipe } from './app/filesize.pipe';
+import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
+import { AuthInterceptor } from './app/auth.interceptor';
+import { APP_BASE_HREF } from '@angular/common';
+import { BrowserModule, bootstrapApplication } from '@angular/platform-browser';
+import { AppRoutingModule } from './app/app-routing.module';
+import { FormsModule } from '@angular/forms';
+import { ClipboardModule } from '@angular/cdk/clipboard';
+import { AppComponent } from './app/app.component';
if (environment.production) {
enableProdMode();
}
-platformBrowserDynamic()
- .bootstrapModule(AppModule)
+bootstrapApplication(AppComponent, {
+ providers: [
+ importProvidersFrom(BrowserModule, AppRoutingModule, FormsModule, ClipboardModule),
+ FileSizePipe,
+ { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
+ { provide: APP_BASE_HREF, useValue: (window as any)['_app_base'] || '/' },
+ provideHttpClient(withInterceptorsFromDi()),
+ ]
+})
.catch((err) => console.error(err));