upgrade to angular 18

This commit is contained in:
Alex Shnitman
2025-06-02 22:41:53 +03:00
parent 607c10c16e
commit 91f1e21df0
3 changed files with 2257 additions and 1375 deletions

View File

@@ -2,7 +2,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule, isDevMode } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { HttpClientModule } from '@angular/common/http';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { CookieService } from 'ngx-cookie-service';
@@ -13,31 +13,24 @@ import { MeTubeSocket } from './metube-socket';
import { NgSelectModule } from '@ng-select/ng-select';
import { ServiceWorkerModule } from '@angular/service-worker';
@NgModule({
declarations: [
AppComponent,
EtaPipe,
SpeedPipe,
FileSizePipe,
EncodeURIComponent,
MasterCheckboxComponent,
SlaveCheckboxComponent
],
imports: [
BrowserModule,
FormsModule,
NgbModule,
HttpClientModule,
FontAwesomeModule,
NgSelectModule,
ServiceWorkerModule.register('custom-service-worker.js', {
enabled: !isDevMode(),
// Register the ServiceWorker as soon as the application is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000'
})
],
providers: [CookieService, MeTubeSocket],
bootstrap: [AppComponent]
})
@NgModule({ declarations: [
AppComponent,
EtaPipe,
SpeedPipe,
FileSizePipe,
EncodeURIComponent,
MasterCheckboxComponent,
SlaveCheckboxComponent
],
bootstrap: [AppComponent], imports: [BrowserModule,
FormsModule,
NgbModule,
FontAwesomeModule,
NgSelectModule,
ServiceWorkerModule.register('custom-service-worker.js', {
enabled: !isDevMode(),
// Register the ServiceWorker as soon as the application is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000'
})], providers: [CookieService, MeTubeSocket, provideHttpClient(withInterceptorsFromDi())] })
export class AppModule { }