mirror of https://github.com/abpframework/abp.git
2 changed files with 42 additions and 41 deletions
@ -0,0 +1,39 @@ |
|||
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; |
|||
import { provideRouter } from '@angular/router'; |
|||
|
|||
import { appRoutes } from './app.routes'; |
|||
import { APP_ROUTE_PROVIDER } from './route.provider'; |
|||
import { provideAbpCore, withOptions } from '@abp/ng.core'; |
|||
import { environment } from '../environments/environment'; |
|||
import { registerLocale } from '@abp/ng.core/locale'; |
|||
import { provideAbpOAuth } from '@abp/ng.oauth'; |
|||
import { provideAbpThemeShared } from '@abp/ng.theme.shared'; |
|||
import { provideSettingManagementConfig } from '@abp/ng.setting-management/config'; |
|||
import { provideAccountConfig } from '@abp/ng.account/config'; |
|||
import { provideIdentityConfig } from '@abp/ng.identity/config'; |
|||
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config'; |
|||
import { provideFeatureManagementConfig } from '@abp/ng.feature-management'; |
|||
|
|||
export const appConfig: ApplicationConfig = { |
|||
providers: [ |
|||
provideRouter(appRoutes), |
|||
APP_ROUTE_PROVIDER, |
|||
provideAbpCore( |
|||
withOptions({ |
|||
environment, |
|||
registerLocaleFn: registerLocale(), |
|||
sendNullsAsQueryParam: false, |
|||
skipGetAppConfiguration: false, |
|||
}), |
|||
), |
|||
provideAbpOAuth(), |
|||
provideAbpThemeShared(), |
|||
provideSettingManagementConfig(), |
|||
provideAccountConfig(), |
|||
provideIdentityConfig(), |
|||
provideTenantManagementConfig(), |
|||
provideFeatureManagementConfig(), |
|||
provideZoneChangeDetection({ eventCoalescing: true }), |
|||
provideRouter(appRoutes), |
|||
], |
|||
}; |
|||
@ -1,43 +1,5 @@ |
|||
import { enableProdMode } from '@angular/core'; |
|||
import { provideRouter } from '@angular/router'; |
|||
import { bootstrapApplication, provideClientHydration, withEventReplay } from '@angular/platform-browser'; |
|||
|
|||
import { environment } from './environments/environment'; |
|||
import { APP_ROUTE_PROVIDER } from './app/route.provider'; |
|||
import { provideAbpCore, withOptions } from '@abp/ng.core'; |
|||
import { registerLocale } from '@abp/ng.core/locale'; |
|||
import { provideAbpOAuth } from '@abp/ng.oauth'; |
|||
import { provideAbpThemeShared } from '@abp/ng.theme.shared'; |
|||
import { provideSettingManagementConfig } from '@abp/ng.setting-management/config'; |
|||
import { provideAccountConfig } from '@abp/ng.account/config'; |
|||
import { provideIdentityConfig } from '@abp/ng.identity/config'; |
|||
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config'; |
|||
import { provideFeatureManagementConfig } from '@abp/ng.feature-management'; |
|||
import { appRoutes } from './app/app.routes'; |
|||
import { bootstrapApplication } from '@angular/platform-browser'; |
|||
import { appConfig } from './app/app.config'; |
|||
import { AppComponent } from './app/app.component'; |
|||
|
|||
if (environment.production) { |
|||
enableProdMode(); |
|||
} |
|||
|
|||
bootstrapApplication(AppComponent, { |
|||
providers: [ |
|||
provideRouter(appRoutes), |
|||
APP_ROUTE_PROVIDER, |
|||
provideAbpCore( |
|||
withOptions({ |
|||
environment, |
|||
registerLocaleFn: registerLocale(), |
|||
sendNullsAsQueryParam: false, |
|||
skipGetAppConfiguration: false, |
|||
}), |
|||
), |
|||
provideAbpOAuth(), |
|||
provideAbpThemeShared(), |
|||
provideSettingManagementConfig(), |
|||
provideAccountConfig(), |
|||
provideIdentityConfig(), |
|||
provideTenantManagementConfig(), |
|||
provideFeatureManagementConfig(), provideClientHydration(withEventReplay()), |
|||
], |
|||
}).catch(err => console.error(err)); |
|||
bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)); |
|||
|
|||
Loading…
Reference in new issue