refactor: don't export all modules everywhere

This commit is contained in:
Dmitry Nehaychik 2019-06-12 10:38:33 +03:00
parent df489ad17e
commit c31ff67052
17 changed files with 218 additions and 263 deletions

View file

@ -1,9 +1,17 @@
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import {
NbAccordionModule,
NbButtonModule,
NbCardModule,
NbListModule,
NbRouteTabsetModule,
NbStepperModule,
NbTabsetModule, NbUserModule,
} from '@nebular/theme';
import { ThemeModule } from '../../@theme/theme.module';
import { LayoutRoutingModule } from './layout-routing.module';
// components
import { LayoutComponent } from './layout.component';
import { Tab1Component, Tab2Component, TabsComponent } from './tabs/tabs.component';
import { StepperComponent } from './stepper/stepper.component';
@ -12,40 +20,37 @@ import { InfiniteListComponent } from './infinite-list/infinite-list.component';
import { NewsPostComponent } from './infinite-list/news-post/news-post.component';
import { NewsPostPlaceholderComponent } from './infinite-list/news-post-placeholder/news-post-placeholder.component';
import { AccordionComponent } from './accordion/accordion.component';
// service
import { NewsService } from './services/news.service';
const COMPONENTS = [
LayoutComponent,
TabsComponent,
Tab1Component,
Tab2Component,
StepperComponent,
ListComponent,
NewsPostPlaceholderComponent,
InfiniteListComponent,
NewsPostComponent,
AccordionComponent,
];
const SERVICES = [
NewsService,
];
const MODULES = [
ThemeModule,
LayoutRoutingModule,
];
@NgModule({
imports: [
...MODULES,
FormsModule,
ReactiveFormsModule,
ThemeModule,
NbTabsetModule,
NbRouteTabsetModule,
NbStepperModule,
NbCardModule,
NbButtonModule,
NbListModule,
NbAccordionModule,
NbUserModule,
LayoutRoutingModule,
],
declarations: [
...COMPONENTS,
LayoutComponent,
TabsComponent,
Tab1Component,
Tab2Component,
StepperComponent,
ListComponent,
NewsPostPlaceholderComponent,
InfiniteListComponent,
NewsPostComponent,
AccordionComponent,
],
providers: [
...SERVICES,
NewsService,
],
})
export class LayoutModule { }