mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-01-28 22:59:03 -06:00
Chore: remove deprecated Angular method (#11919)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
APP_INITIALIZER,
|
|
||||||
enableProdMode,
|
|
||||||
importProvidersFrom,
|
importProvidersFrom,
|
||||||
|
inject,
|
||||||
|
provideAppInitializer,
|
||||||
provideZoneChangeDetection,
|
provideZoneChangeDetection,
|
||||||
} from '@angular/core'
|
} from '@angular/core'
|
||||||
|
|
||||||
@@ -159,7 +159,6 @@ import { UsernamePipe } from './app/pipes/username.pipe'
|
|||||||
import { SettingsService } from './app/services/settings.service'
|
import { SettingsService } from './app/services/settings.service'
|
||||||
import { LocalizedDateParserFormatter } from './app/utils/ngb-date-parser-formatter'
|
import { LocalizedDateParserFormatter } from './app/utils/ngb-date-parser-formatter'
|
||||||
import { ISODateAdapter } from './app/utils/ngb-iso-date-adapter'
|
import { ISODateAdapter } from './app/utils/ngb-iso-date-adapter'
|
||||||
import { environment } from './environments/environment'
|
|
||||||
|
|
||||||
import localeAf from '@angular/common/locales/af'
|
import localeAf from '@angular/common/locales/af'
|
||||||
import localeAr from '@angular/common/locales/ar'
|
import localeAr from '@angular/common/locales/ar'
|
||||||
@@ -237,11 +236,11 @@ registerLocaleData(localeUk)
|
|||||||
registerLocaleData(localeZh)
|
registerLocaleData(localeZh)
|
||||||
registerLocaleData(localeZhHant)
|
registerLocaleData(localeZhHant)
|
||||||
|
|
||||||
function initializeApp(settings: SettingsService) {
|
function initializeApp() {
|
||||||
return () => {
|
const settings = inject(SettingsService)
|
||||||
return settings.initializeSettings()
|
return settings.initializeSettings()
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const icons = {
|
const icons = {
|
||||||
airplane,
|
airplane,
|
||||||
archive,
|
archive,
|
||||||
@@ -363,10 +362,6 @@ const icons = {
|
|||||||
xLg,
|
xLg,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (environment.production) {
|
|
||||||
enableProdMode()
|
|
||||||
}
|
|
||||||
|
|
||||||
bootstrapApplication(AppComponent, {
|
bootstrapApplication(AppComponent, {
|
||||||
providers: [
|
providers: [
|
||||||
provideZoneChangeDetection(),
|
provideZoneChangeDetection(),
|
||||||
@@ -383,12 +378,7 @@ bootstrapApplication(AppComponent, {
|
|||||||
DragDropModule,
|
DragDropModule,
|
||||||
NgxBootstrapIconsModule.pick(icons)
|
NgxBootstrapIconsModule.pick(icons)
|
||||||
),
|
),
|
||||||
{
|
provideAppInitializer(initializeApp),
|
||||||
provide: APP_INITIALIZER,
|
|
||||||
useFactory: initializeApp,
|
|
||||||
deps: [SettingsService],
|
|
||||||
multi: true,
|
|
||||||
},
|
|
||||||
DatePipe,
|
DatePipe,
|
||||||
CookieService,
|
CookieService,
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user