mirror of https://github.com/abpframework/abp.git
12 changed files with 71 additions and 107 deletions
@ -1,12 +1,14 @@ |
|||
import { Component } from '@angular/core'; |
|||
import { InternetConnectionStatusComponent, LoaderBarComponent } from '@abp/ng.theme.shared'; |
|||
import { DynamicLayoutComponent } from '@abp/ng.core'; |
|||
|
|||
@Component({ |
|||
standalone: false, |
|||
selector: 'app-root', |
|||
template: ` |
|||
<abp-loader-bar /> |
|||
<abp-dynamic-layout /> |
|||
<abp-internet-status /> |
|||
`,
|
|||
imports: [LoaderBarComponent, DynamicLayoutComponent, InternetConnectionStatusComponent], |
|||
}) |
|||
export class AppComponent {} |
|||
|
|||
@ -0,0 +1,46 @@ |
|||
import {ApplicationConfig, importProvidersFrom} from '@angular/core'; |
|||
import { provideRouter } from '@angular/router'; |
|||
import {provideAnimations} from "@angular/platform-browser/animations"; |
|||
|
|||
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'; |
|||
import {ThemeLeptonXModule} from "@abp/ng.theme.lepton-x"; |
|||
import {SideMenuLayoutModule} from "@abp/ng.theme.lepton-x/layouts"; |
|||
import {AccountLayoutModule} from "@abp/ng.theme.lepton-x/account"; |
|||
|
|||
export const appConfig: ApplicationConfig = { |
|||
providers: [ |
|||
provideRouter(appRoutes), |
|||
APP_ROUTE_PROVIDER, |
|||
provideAbpCore( |
|||
withOptions({ |
|||
environment, |
|||
registerLocaleFn: registerLocale(), |
|||
}) |
|||
), |
|||
provideAbpOAuth(), |
|||
provideAbpThemeShared(), |
|||
provideSettingManagementConfig(), |
|||
provideAccountConfig(), |
|||
provideIdentityConfig(), |
|||
provideTenantManagementConfig(), |
|||
provideFeatureManagementConfig(), |
|||
provideAnimations(), |
|||
provideAbpCore(), |
|||
importProvidersFrom([ |
|||
ThemeLeptonXModule.forRoot(), |
|||
SideMenuLayoutModule.forRoot(), |
|||
AccountLayoutModule.forRoot(), |
|||
]) |
|||
], |
|||
}; |
|||
@ -1,56 +0,0 @@ |
|||
import { CoreModule, provideAbpCore, withOptions } from '@abp/ng.core'; |
|||
import { registerLocale } from '@abp/ng.core/locale'; |
|||
import { |
|||
InternetConnectionStatusComponent, |
|||
ThemeSharedModule, |
|||
provideAbpThemeShared, |
|||
} from '@abp/ng.theme.shared'; |
|||
import { provideFeatureManagementConfig } from '@abp/ng.feature-management'; |
|||
import { provideAbpOAuth } from '@abp/ng.oauth'; |
|||
import { provideIdentityConfig } from '@abp/ng.identity/config'; |
|||
import { provideSettingManagementConfig } from '@abp/ng.setting-management/config'; |
|||
import { provideTenantManagementConfig } from '@abp/ng.tenant-management/config'; |
|||
import { provideAccountConfig } from '@abp/ng.account/config'; |
|||
import { ThemeLeptonXModule } from '@abp/ng.theme.lepton-x'; |
|||
import { SideMenuLayoutModule } from '@abp/ng.theme.lepton-x/layouts'; |
|||
import { AccountLayoutModule } from '@abp/ng.theme.lepton-x/account'; |
|||
import { NgModule } from '@angular/core'; |
|||
import { BrowserModule } from '@angular/platform-browser'; |
|||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
|||
import { environment } from '../environments/environment'; |
|||
import { AppRoutingModule } from './app-routing.module'; |
|||
import { AppComponent } from './app.component'; |
|||
import { APP_ROUTE_PROVIDER } from './route.provider'; |
|||
|
|||
@NgModule({ |
|||
imports: [ |
|||
BrowserModule, |
|||
BrowserAnimationsModule, |
|||
AppRoutingModule, |
|||
CoreModule, |
|||
ThemeSharedModule, |
|||
ThemeLeptonXModule.forRoot(), |
|||
SideMenuLayoutModule.forRoot(), |
|||
AccountLayoutModule.forRoot(), |
|||
InternetConnectionStatusComponent, |
|||
], |
|||
declarations: [AppComponent], |
|||
providers: [ |
|||
APP_ROUTE_PROVIDER, |
|||
provideAbpCore( |
|||
withOptions({ |
|||
environment, |
|||
registerLocaleFn: registerLocale(), |
|||
}) |
|||
), |
|||
provideAbpOAuth(), |
|||
provideAbpThemeShared(), |
|||
provideSettingManagementConfig(), |
|||
provideAccountConfig(), |
|||
provideIdentityConfig(), |
|||
provideTenantManagementConfig(), |
|||
provideFeatureManagementConfig(), |
|||
], |
|||
bootstrap: [AppComponent], |
|||
}) |
|||
export class AppModule {} |
|||
@ -1,11 +0,0 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { Routes, RouterModule } from '@angular/router'; |
|||
import { HomeComponent } from './home.component'; |
|||
|
|||
const routes: Routes = [{ path: '', component: HomeComponent }]; |
|||
|
|||
@NgModule({ |
|||
imports: [RouterModule.forChild(routes)], |
|||
exports: [RouterModule], |
|||
}) |
|||
export class HomeRoutingModule {} |
|||
@ -1,10 +0,0 @@ |
|||
import { NgModule } from '@angular/core'; |
|||
import { SharedModule } from '../shared/shared.module'; |
|||
import { HomeRoutingModule } from './home-routing.module'; |
|||
import { HomeComponent } from './home.component'; |
|||
|
|||
@NgModule({ |
|||
declarations: [HomeComponent], |
|||
imports: [SharedModule, HomeRoutingModule], |
|||
}) |
|||
export class HomeModule {} |
|||
@ -0,0 +1,9 @@ |
|||
import { Routes } from '@angular/router'; |
|||
|
|||
export const homeRoutes: Routes = [ |
|||
{ |
|||
path: '', |
|||
pathMatch: 'full', |
|||
loadComponent: () => import('./home.component').then(m => m.HomeComponent), |
|||
}, |
|||
]; |
|||
@ -1,13 +1,5 @@ |
|||
import { enableProdMode } from '@angular/core'; |
|||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; |
|||
import { bootstrapApplication } from '@angular/platform-browser'; |
|||
import { appConfig } from './app/app.config'; |
|||
import { AppComponent } from './app/app.component'; |
|||
|
|||
import { AppModule } from './app/app.module'; |
|||
import { environment } from './environments/environment'; |
|||
|
|||
if (environment.production) { |
|||
enableProdMode(); |
|||
} |
|||
|
|||
platformBrowserDynamic() |
|||
.bootstrapModule(AppModule) |
|||
.catch(err => console.error(err)); |
|||
bootstrapApplication(AppComponent, appConfig).catch(err => console.error(err)); |
|||
|
|||
Loading…
Reference in new issue