Implements Lazy Loading
This commit is contained in:
18
src/app/home/home-router.module.ts
Normal file
18
src/app/home/home-router.module.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import {HomeComponent} from "./home.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HomeComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [CommonModule, RouterModule.forChild(routes)],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class HomeRouterModule {}
|
||||
@@ -4,6 +4,7 @@ import {HomeComponent} from "./home.component";
|
||||
import {StackSliderComponent} from "./stack-slider/stack-slider.component";
|
||||
import {StackCardComponent} from "./stack-slider/stack-card/stack-card.component";
|
||||
import {NgxGlideComponent} from "ngx-glide";
|
||||
import {HomeRouterModule} from "./home-router.module";
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +17,8 @@ import {NgxGlideComponent} from "ngx-glide";
|
||||
imports: [
|
||||
CommonModule,
|
||||
NgxGlideComponent,
|
||||
NgOptimizedImage
|
||||
NgOptimizedImage,
|
||||
HomeRouterModule
|
||||
]
|
||||
})
|
||||
export class HomeModule { }
|
||||
|
||||
Reference in New Issue
Block a user