Skip to content

Commit 62c99df

Browse files
committed
Add lazily routed route to features
1 parent 887dbbe commit 62c99df

File tree

11 files changed

+54
-42
lines changed

11 files changed

+54
-42
lines changed

src/app/app-routing.module.ts

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,44 @@ import { NgModule } from '@angular/core';
22
import { Routes, RouterModule } from '@angular/router';
33

44
const routes: Routes = [
5-
// {
6-
// path: 'returns',
7-
// component: ReturnsComponent,
8-
// },
9-
// {
10-
// path: 'click-and-collect',
11-
// component: ClickAndCollectComponent,
12-
// },
13-
// {
14-
// path: 'delivery',
15-
// component: DeliveryComponent,
16-
// },
17-
// {
18-
// path: 'profile',
19-
// component: ProfileComponent,
20-
// },
21-
// {
22-
// path: 'about-us',
23-
// component: ImprintComponent,
24-
// },
25-
// {
26-
// path: 'privacy-statement',
27-
// component: PrivacyPolicyComponent,
28-
// },
5+
{
6+
path: 'returns',
7+
loadChildren: () =>
8+
import('./features/returns/returns.module').then((m) => m.ReturnsModule),
9+
},
10+
{
11+
path: 'click-and-collect',
12+
loadChildren: () =>
13+
import('./features/click-and-collect/click-and-collect.module').then(
14+
(m) => m.ClickAndCollectModule
15+
),
16+
},
17+
{
18+
path: 'delivery',
19+
loadChildren: () =>
20+
import('./features/delivery/delivery.module').then(
21+
(m) => m.DeliveryModule
22+
),
23+
},
24+
{
25+
path: 'profile',
26+
loadChildren: () =>
27+
import('./features/user-profile/user-profile.module').then(
28+
(m) => m.UserProfileModule
29+
),
30+
},
31+
{
32+
path: 'about-us',
33+
loadChildren: () =>
34+
import('./features/imprint/imprint.module').then((m) => m.ImprintModule),
35+
},
36+
{
37+
path: 'privacy-statement',
38+
loadChildren: () =>
39+
import('./features/privacy-policy/privacy-policy.module').then(
40+
(m) => m.PrivacyPolicyModule
41+
),
42+
},
2943
];
3044

3145
@NgModule({

src/app/features/click-and-collect/click-and-collect.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { ClickAndCollectComponent } from './pages/click-and-collect/click-and-collect.component';
44
import { RouterModule, Routes } from '@angular/router';
5+
import { SharedModule } from 'src/app/shared/shared.module';
56

67
const routes: Routes = [
78
{
@@ -12,6 +13,6 @@ const routes: Routes = [
1213

1314
@NgModule({
1415
declarations: [ClickAndCollectComponent],
15-
imports: [CommonModule, RouterModule.forChild(routes)],
16+
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
1617
})
1718
export class ClickAndCollectModule {}

src/app/features/click-and-collect/pages/click-and-collect/click-and-collect.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Component, OnInit } from '@angular/core';
2-
import { ScreenService } from 'src/app/services/screen.service';
1+
import { Component } from '@angular/core';
2+
import { ScreenService } from 'src/app/core/services/screen.service';
33

44
@Component({
55
selector: 'app-click-and-collect',

src/app/features/delivery/delivery.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { DeliveryComponent } from './pages/delivery/delivery.component';
44
import { RouterModule, Routes } from '@angular/router';
5+
import { SharedModule } from 'src/app/shared/shared.module';
56

67
const routes: Routes = [
78
{
@@ -12,6 +13,6 @@ const routes: Routes = [
1213

1314
@NgModule({
1415
declarations: [DeliveryComponent],
15-
imports: [CommonModule, RouterModule.forChild(routes)],
16+
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
1617
})
1718
export class DeliveryModule {}

src/app/features/delivery/pages/delivery/delivery.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { ScreenService } from 'src/app/services/screen.service';
2+
import { ScreenService } from 'src/app/core/services/screen.service';
33

44
@Component({
55
selector: 'app-delivery',

src/app/features/imprint/pages/imprint/imprint.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component } from '@angular/core';
22

33
@Component({
44
selector: 'app-imprint',

src/app/features/privacy-policy/privacy-statement.module.ts renamed to src/app/features/privacy-policy/privacy-policy.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule, Routes } from '@angular/router';
44
import { PrivacyPolicyComponent } from './pages/privacy-policy/privacy-policy.component';
5+
import { SharedModule } from 'src/app/shared/shared.module';
56

67
const routes: Routes = [
78
{
@@ -12,6 +13,6 @@ const routes: Routes = [
1213

1314
@NgModule({
1415
declarations: [PrivacyPolicyComponent],
15-
imports: [CommonModule, RouterModule.forChild(routes)],
16+
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
1617
})
1718
export class PrivacyPolicyModule {}

src/app/features/returns/pages/returns/returns.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { ScreenService } from 'src/app/services/screen.service';
2+
import { ScreenService } from 'src/app/core/services/screen.service';
33

44
@Component({
55
selector: 'app-returns',

src/app/features/returns/returns.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33
import { RouterModule, Routes } from '@angular/router';
44
import { ReturnsComponent } from './pages/returns/returns.component';
5+
import { SharedModule } from 'src/app/shared/shared.module';
56

67
const routes: Routes = [
78
{
@@ -12,6 +13,6 @@ const routes: Routes = [
1213

1314
@NgModule({
1415
declarations: [ReturnsComponent],
15-
imports: [CommonModule, RouterModule.forChild(routes)],
16+
imports: [CommonModule, SharedModule, RouterModule.forChild(routes)],
1617
})
1718
export class ReturnsModule {}

src/app/features/user-profile/pages/profile/profile.component.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- <section class="content-area" role="main">
1+
<section class="content-area" role="main">
22
<h1>{{ "Profile.Title" | translate }}</h1>
33
<hr />
44
<div class="row mb-2">
@@ -53,10 +53,4 @@ <h2>{{ "Profile.CreateAnAccount" | translate }}</h2>
5353
</div>
5454
</div>
5555
</div>
56-
</section> -->
57-
<h3>OK</h3>
58-
<!-- <vcl-icogram>GOAT</vcl-icogram> -->
59-
60-
<!-- <vcl-icogram>
61-
{{ "Profile.Continue" | translate }}
62-
</vcl-icogram> -->
56+
</section>

src/app/features/user-profile/pages/profile/profile.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { ScreenService } from 'src/app/services/screen.service';
2+
import { ScreenService } from 'src/app/core/services/screen.service';
33

44
@Component({
55
selector: 'app-profile',

0 commit comments

Comments
 (0)