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