mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-16 15:40:11 +01:00
refactor(app): remove shared module, export dependencies through
This commit is contained in:
parent
b5666805bf
commit
3880ab3d74
13 changed files with 27 additions and 86 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
import {
|
||||
NbActionsModule,
|
||||
|
|
@ -13,6 +14,7 @@ import {
|
|||
NbTabsetModule,
|
||||
NbThemeModule,
|
||||
NbUserModule,
|
||||
NbCheckboxModule,
|
||||
} from '@nebular/theme';
|
||||
|
||||
import {
|
||||
|
|
@ -44,6 +46,8 @@ const NB_MODULES = [
|
|||
NbActionsModule,
|
||||
NbSearchModule,
|
||||
NbSidebarModule,
|
||||
NbCheckboxModule,
|
||||
NgbModule,
|
||||
];
|
||||
|
||||
const COMPONENTS = [
|
||||
|
|
@ -65,7 +69,7 @@ const NB_THEME_PROVIDERS = [
|
|||
{
|
||||
name: 'default',
|
||||
},
|
||||
[DEFAULT_THEME, COSMIC_THEME],
|
||||
[ DEFAULT_THEME, COSMIC_THEME ],
|
||||
).providers,
|
||||
...NbSidebarModule.forRoot().providers,
|
||||
...NbMenuModule.forRoot().providers,
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { CoreModule } from './@core/core.module';
|
|||
import { AppComponent } from './app.component';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { ThemeModule } from './@theme/theme.module';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
|
|
@ -21,7 +22,8 @@ import { ThemeModule } from './@theme/theme.module';
|
|||
BrowserAnimationsModule,
|
||||
HttpModule,
|
||||
AppRoutingModule,
|
||||
CoreModule,
|
||||
|
||||
NgbModule.forRoot(),
|
||||
ThemeModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ import { NgModule } from '@angular/core';
|
|||
import { AngularEchartsModule } from 'ngx-echarts';
|
||||
import { NgxChartsModule } from '@swimlane/ngx-charts';
|
||||
import { ChartsModule as Ng2Charts } from 'ng2-charts/ng2-charts';
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
import { ChartsRoutingModule, routedComponents } from './charts-routing.module';
|
||||
import { ChartjsBarComponent } from './chartjs/chartjs-bar.component';
|
||||
import { ChartjsLineComponent } from './chartjs/chartjs-line.component';
|
||||
|
|
@ -48,7 +48,7 @@ const components = [
|
|||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [SharedModule, ChartsRoutingModule, AngularEchartsModule, NgxChartsModule, Ng2Charts],
|
||||
imports: [ThemeModule, ChartsRoutingModule, AngularEchartsModule, NgxChartsModule, Ng2Charts],
|
||||
declarations: [...routedComponents, ...components],
|
||||
})
|
||||
export class ChartsModule {}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NbCheckboxModule } from '@nebular/theme';
|
||||
|
||||
import { TreeModule } from 'ng2-tree';
|
||||
import { ToasterModule } from 'angular2-toaster';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { ComponentsRoutingModule, routedComponents } from './components-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
ComponentsRoutingModule,
|
||||
TreeModule,
|
||||
ToasterModule,
|
||||
NbCheckboxModule,
|
||||
],
|
||||
declarations: [
|
||||
...routedComponents,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NbTabsetModule, NbUserModule } from '@nebular/theme';
|
||||
import { AngularEchartsModule } from 'ngx-echarts';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
import { StatusCardComponent } from './status-card/status-card.component';
|
||||
import { ContactsComponent } from './contacts/contacts.component';
|
||||
|
|
@ -20,11 +19,10 @@ import { PlayerComponent } from './player/player.component';
|
|||
import { TrafficComponent } from './traffic/traffic.component';
|
||||
import { TrafficChartComponent } from './traffic/traffic-chart.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
NbTabsetModule,
|
||||
NbUserModule,
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
AngularEchartsModule,
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CKEditorModule } from 'ng2-ckeditor';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
|
||||
import { EditorsRoutingModule, routedComponents } from './editors-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
EditorsRoutingModule,
|
||||
CKEditorModule,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,12 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { NbCheckboxModule } from '@nebular/theme';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { FormsRoutingModule, routedComponents } from './forms-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
FormsRoutingModule,
|
||||
NgbModule,
|
||||
NbCheckboxModule,
|
||||
],
|
||||
declarations: [
|
||||
...routedComponents,
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ import { AgmCoreModule } from '@agm/core';
|
|||
import { LeafletModule } from '@asymmetrik/angular2-leaflet';
|
||||
import { AngularEchartsModule } from 'ngx-echarts';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { MapsRoutingModule, routedComponents } from './maps-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
AgmCoreModule.forRoot(),
|
||||
LeafletModule.forRoot(),
|
||||
MapsRoutingModule,
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Ng2SmartTableModule } from 'ng2-smart-table';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { TablesRoutingModule, routedComponents } from './tables-routing.module';
|
||||
import { SmartTableService } from '../../@core/data/smart-table.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
TablesRoutingModule,
|
||||
Ng2SmartTableModule,
|
||||
],
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NbActionsModule, NbSearchModule, NbUserModule } from '@nebular/theme';
|
||||
|
||||
import { SharedModule } from '../../../shared.module';
|
||||
|
||||
import { ThemeModule } from '../../../@theme/theme.module';
|
||||
import { DefaultButtonsComponent } from './default-buttons/default-buttons.component';
|
||||
import { HeroButtonComponent } from './hero-buttons/hero-buttons.component';
|
||||
import { ShapeButtonsComponent } from './shape-buttons/shape-buttons.component';
|
||||
|
|
@ -31,10 +29,7 @@ const components = [
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
NbActionsModule,
|
||||
NbSearchModule,
|
||||
NbUserModule,
|
||||
ThemeModule,
|
||||
],
|
||||
exports: [
|
||||
...components,
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { NbTabsetModule, NbRouteTabsetModule, NbSearchModule } from '@nebular/theme';
|
||||
|
||||
import { SharedModule } from '../../shared.module';
|
||||
|
||||
import { ThemeModule } from '../../@theme/theme.module';
|
||||
import { ButtonsModule } from './buttons/buttons.module';
|
||||
|
||||
import { UiFeaturesRoutingModule } from './ui-features-routing.module';
|
||||
import { UiFeaturesComponent } from './ui-features.component';
|
||||
import { GridComponent } from './grid/grid.component';
|
||||
|
|
@ -30,11 +27,8 @@ const components = [
|
|||
|
||||
@NgModule({
|
||||
imports: [
|
||||
SharedModule,
|
||||
ThemeModule,
|
||||
UiFeaturesRoutingModule,
|
||||
NbTabsetModule,
|
||||
NbRouteTabsetModule,
|
||||
NbSearchModule,
|
||||
ButtonsModule,
|
||||
],
|
||||
declarations: [
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { NbCardModule, NbThemeModule } from '@nebular/theme';
|
||||
import { ThemeModule } from './@theme/theme.module';
|
||||
|
||||
@NgModule({
|
||||
exports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
NbCardModule,
|
||||
NbThemeModule,
|
||||
ThemeModule,
|
||||
],
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
|
@ -9,34 +9,12 @@
|
|||
"@angular/*": [
|
||||
"../node_modules/@angular/*"
|
||||
],
|
||||
"@akveo/*": [
|
||||
"../node_modules/@akveo/*"
|
||||
],
|
||||
"@ng-bootstrap/*": [
|
||||
"../node_modules/@ng-bootstrap/*"
|
||||
],
|
||||
"bootstrap/*": [
|
||||
"../node_modules/bootstrap/*"
|
||||
],
|
||||
"font-awesome/*": [
|
||||
"../node_modules/font-awesome/*"
|
||||
"@nebular/*": [
|
||||
"../node_modules/@nebular/*"
|
||||
],
|
||||
"immutable/*": [
|
||||
"../node_modules/immutable/*"
|
||||
],
|
||||
"ionicons/*": [
|
||||
"../node_modules/ionicons/*"
|
||||
],
|
||||
"normalize.css/*": [
|
||||
"../node_modules/normalize.css/*"
|
||||
],
|
||||
"segoe-fonts/*": [
|
||||
"../node_modules/segoe-fonts/*"
|
||||
],
|
||||
"typeface-exo/*": [
|
||||
"../node_modules/typeface-exo/*"
|
||||
]
|
||||
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue