Skip to content

Commit 1f07aa5

Browse files
committed
fix(grid-crm): fix routes for stackblitz generation
1 parent eac7eee commit 1f07aa5

File tree

7 files changed

+60
-13
lines changed

7 files changed

+60
-13
lines changed

live-editing/Routes.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { GridFinjsModule } from '../projects/app-lob/src/app/grid-finjs/grid-fin
44
import * as TreeGridFinjsRouting from '../projects/app-lob/src/app/treegrid-finjs/treegrid-finjs-routing.module';
55
import { TreeGridFinjsModule } from '../projects/app-lob/src/app/treegrid-finjs/treegrid-finjs.module';
66

7-
import * as GridCRMRouting from '../projects/app-crm/src/app/app.routing.module';
7+
import * as GridCRMRouting from '../projects/app-crm/src/app/grid-crm/grid-crm-routing.module';
88

99
import * as GridsDVRouting from '../projects/app-lob/src/app/grid/grids-routing.module';
1010
import { GridsDVModule } from '../projects/app-lob/src/app/grid/grids.module';
@@ -50,6 +50,7 @@ import { PivotGridsModule } from '../src/app/pivot-grid/pivot-grids.module';
5050
import { PivotGridsRoutingModule } from '../src/app/pivot-grid/pivot-grids-routing.module';
5151
import { GridCRMComponent } from '../projects/app-crm/src/app/grid-crm/grid-crm.component';
5252
import { AppModule } from '../projects/app-crm/src/app/app.module';
53+
import { GridsCrmModule } from '../projects/app-crm/src/app/grid-crm/grid-crm.module';
5354

5455
export const MODULE_ROUTES = [
5556
{
@@ -164,8 +165,8 @@ export const DV_MODULE_ROUTES = [
164165

165166
export const CRM_MODULE_ROUTES = [
166167
{
167-
module: AppModule,
168+
module: GridsCrmModule,
168169
path: 'grid-crm',
169-
routes: GridCRMRouting.appRoutes
170+
routes: GridCRMRouting.gridCrmRoutes
170171
}
171172
];

projects/app-crm/src/app/app.module.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,18 @@ import { NgModule } from '@angular/core';
22
import { FormsModule } from '@angular/forms';
33
import { BrowserModule, HammerModule } from '@angular/platform-browser';
44
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
5-
import { RouterModule } from '@angular/router';
65
import {
76
IgxAutocompleteModule, IgxButtonModule, IgxIconModule, IgxInputGroupModule, IgxLayoutModule,
87
IgxRippleModule, IgxGridModule, IgxAvatarModule
98
} from 'igniteui-angular';
109
import { IgxPreventDocumentScrollModule } from '../../../../src/app/directives/prevent-scroll.directive';
1110
import { AppComponent } from './app.component';
1211
import { AppRoutingModule } from './app.routing.module';
13-
import { GridCRMComponent } from './grid-crm/grid-crm.component';
1412

1513
@NgModule({
1614
bootstrap: [AppComponent],
1715
declarations: [
18-
AppComponent,
19-
GridCRMComponent
16+
AppComponent
2017
],
2118
imports: [
2219
IgxAutocompleteModule,

projects/app-crm/src/app/app.routing.module.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import { NgModule } from '@angular/core';
22
import { RouterModule, Routes } from '@angular/router';
3-
import { GridCRMComponent } from './grid-crm/grid-crm.component';
43

54
export const appRoutes: Routes = [
65
{
7-
path: '',
8-
pathMatch: 'full',
9-
component: GridCRMComponent
6+
path: '', pathMatch: 'full', redirectTo: '/grid-crm'
7+
},
8+
{
9+
loadChildren: () => import('./grid-crm/grid-crm.module').then(m => m.GridsCrmModule),
10+
path: 'grid-crm'
1011
}
1112
];
12-
1313
@NgModule({
1414
exports: [
1515
RouterModule
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule, Routes } from '@angular/router';
3+
import { GridCRMComponent } from './grid-crm.component';
4+
5+
export const gridCrmRoutes: Routes = [
6+
{
7+
component: GridCRMComponent,
8+
path: ''
9+
}
10+
];
11+
12+
@NgModule({
13+
exports: [
14+
RouterModule
15+
],
16+
imports: [
17+
RouterModule.forChild(gridCrmRoutes)
18+
]
19+
})
20+
export class GridsCrmRoutingModule { }
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* eslint-disable max-len */
2+
import { NgModule } from '@angular/core';
3+
import { FormsModule } from '@angular/forms';
4+
import {
5+
IgxAvatarModule, IgxButtonModule, IgxGridModule,
6+
IgxIconModule, IgxInputGroupModule, IgxRippleModule
7+
} from 'igniteui-angular';
8+
9+
import { IgxPreventDocumentScrollModule } from '../../../../../src/app/directives/prevent-scroll.directive';
10+
import { GridsCrmRoutingModule } from './grid-crm-routing.module';
11+
import { GridCRMComponent } from './grid-crm.component';
12+
13+
@NgModule({
14+
declarations: [
15+
GridCRMComponent
16+
],
17+
imports: [
18+
IgxRippleModule,
19+
GridsCrmRoutingModule,
20+
IgxGridModule,
21+
IgxIconModule,
22+
IgxAvatarModule,
23+
IgxInputGroupModule,
24+
IgxButtonModule,
25+
FormsModule,
26+
IgxPreventDocumentScrollModule,
27+
]
28+
})
29+
export class GridsCrmModule { }
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"generationTimeStamp":1670343823993}
1+
{"generationTimeStamp":1670354208246}

0 commit comments

Comments
 (0)