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,25 +1,25 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RouterModule, Routes } from '@angular/router';
import { MiscellaneousComponent } from './miscellaneous.component';
import { NotFoundComponent } from './not-found/not-found.component';
const routes: Routes = [{
path: '',
component: MiscellaneousComponent,
children: [{
path: '404',
component: NotFoundComponent,
}],
}];
const routes: Routes = [
{
path: '',
component: MiscellaneousComponent,
children: [
{
path: '404',
component: NotFoundComponent,
},
],
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class MiscellaneousRoutingModule { }
export const routedComponents = [
MiscellaneousComponent,
NotFoundComponent,
];
export class MiscellaneousRoutingModule {
}

View file

@ -1,14 +1,20 @@
import { NgModule } from '@angular/core';
import { NbCardModule } from '@nebular/theme';
import { ThemeModule } from '../../@theme/theme.module';
import { MiscellaneousRoutingModule, routedComponents } from './miscellaneous-routing.module';
import { MiscellaneousRoutingModule } from './miscellaneous-routing.module';
import { MiscellaneousComponent } from './miscellaneous.component';
import { NotFoundComponent } from './not-found/not-found.component';
@NgModule({
imports: [
ThemeModule,
NbCardModule,
MiscellaneousRoutingModule,
],
declarations: [
...routedComponents,
MiscellaneousComponent,
NotFoundComponent,
],
})
export class MiscellaneousModule { }