Skip to content

Commit

Permalink
refactor: split home module
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Apr 3, 2020
1 parent 99aa456 commit cc768d2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 20 deletions.
9 changes: 5 additions & 4 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ import { MaturityComponent } from './presentation/maturity/maturity.component';

const routes: Routes = [
{ path: '', pathMatch: 'full', redirectTo: '/home' },
{
path: 'home',
component: HomeComponent,
},
{
path: 'case-study',
component: CaseStudyComponent,
Expand Down Expand Up @@ -75,6 +71,11 @@ const routes: Routes = [
loadChildren: () =>
import('./presentation/design/design.module').then((m) => m.DesignModule),
},
{
path: 'home',
loadChildren: () =>
import('./presentation/home/home.module').then((m) => m.HomeModule),
},
{
path: 'helper',
loadChildren: () =>
Expand Down
16 changes: 0 additions & 16 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,26 @@ import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SharedModule } from './shared/shared.module';
import { PeriodicTableComponent } from './features/periodic-table/periodic-table.component';
import { AtomComponent } from './features/atom/atom.component';
import { AtomDetailsComponent } from './features/atom-details/atom-details.component';
import { AppPhaseComponent } from './features/app-phase/app-phase.component';
import { AppWikiComponent } from './features/app-wiki/app-wiki.component';
import { HttpClientModule } from '@angular/common/http';
import { HomeComponent } from './presentation/home/home.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { CustomMaterialModule } from './shared/custom-material.module';
import { CaseStudyComponent } from './presentation/case-study/case-study.component';
import { PatternComponent } from './presentation/pattern/pattern.component';
import { PractiseComponent } from './presentation/practise/practise.component';
import { ManualComponent } from './presentation/manual/manual.component';
import { FormsModule } from '@angular/forms';
import { DragulaModule } from 'ng2-dragula';
import { MaturityItemComponent } from './presentation/maturity/maturity-item/maturity-item.component';
import { ResourcesComponent } from './presentation/resources/resources.component';
import { ReporterComponent } from './presentation/reporter/reporter.component';
import { AwesomeToolComponent } from './presentation/awesome-tool/awesome-tool.component';
import { MobileComponent } from './presentation/mobile/mobile.component';
import { ThinkTankComponent } from './presentation/think-tank/think-tank.component';
import { SolutionComponent } from './presentation/solution/solution.component';
import { AtomDialogComponent } from './features/atom-dialog/atom-dialog.component';
import { MaturityComponent } from './presentation/maturity/maturity.component';

@NgModule({
declarations: [
AppComponent,
HomeComponent,

PeriodicTableComponent,
AtomComponent,
AtomDetailsComponent,
AtomDialogComponent,
AppPhaseComponent,
AppWikiComponent,

CaseStudyComponent,
PatternComponent,
Expand Down
31 changes: 31 additions & 0 deletions src/app/presentation/home/home.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HomeComponent } from './home.component';
import { PeriodicTableComponent } from '../../features/periodic-table/periodic-table.component';
import { AtomComponent } from '../../features/atom/atom.component';
import { AtomDetailsComponent } from '../../features/atom-details/atom-details.component';
import { AtomDialogComponent } from '../../features/atom-dialog/atom-dialog.component';
import { AppPhaseComponent } from '../../features/app-phase/app-phase.component';
import { AppWikiComponent } from '../../features/app-wiki/app-wiki.component';
import { SharedModule } from '../../shared/shared.module';
import { RouterModule } from '@angular/router';
import { CustomMaterialModule } from '../../shared/custom-material.module';

@NgModule({
declarations: [
HomeComponent,
PeriodicTableComponent,
AtomComponent,
AtomDetailsComponent,
AtomDialogComponent,
AppPhaseComponent,
AppWikiComponent,
],
imports: [
CommonModule,
SharedModule,
CustomMaterialModule,
RouterModule.forChild([{ path: '', component: HomeComponent }]),
],
})
export class HomeModule {}

0 comments on commit cc768d2

Please sign in to comment.