run ng generate @angular:core/standalone --mode "standalone-bootstrap"
This commit is contained in:
parent
4fb9e972f5
commit
c1e48d35a5
3 changed files with 25 additions and 59 deletions
|
|
@ -1,9 +1,10 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
template: '<router-outlet></router-outlet>',
|
||||
styles: [],
|
||||
standalone: false,
|
||||
selector: 'app-root',
|
||||
template: '<router-outlet></router-outlet>',
|
||||
styles: [],
|
||||
imports: [RouterOutlet],
|
||||
})
|
||||
export class AppComponent {}
|
||||
|
|
|
|||
|
|
@ -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 {}
|
||||
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue