@@ -2,22 +2,33 @@ import { NgModule } from '@angular/core';
2
2
import { CommonModule } from '@angular/common' ;
3
3
import { BrowserModule } from '@angular/platform-browser' ;
4
4
import { JsonApiNestjsSdkModule } from 'json-api-nestjs-sdk' ;
5
- import { BookList , Users , Roles , Comments , Addresses } from 'database/entity' ;
5
+ import { Users , Roles , Comments , Addresses } from 'database/entity' ;
6
6
7
7
import { AppComponent } from './app.component' ;
8
8
import { NxWelcomeComponent } from './nx-welcome.component' ;
9
+ import { ChildModule } from './child/child.module' ;
10
+ import { Route , RouterModule } from '@angular/router' ;
11
+
12
+ export const appRoutes : Route [ ] = [
13
+ {
14
+ path : 'child' ,
15
+ loadChildren : ( ) =>
16
+ import ( './child/child.module' ) . then ( ( r ) => r . ChildModule ) ,
17
+ } ,
18
+ ] ;
9
19
10
20
@NgModule ( {
11
21
declarations : [ AppComponent , NxWelcomeComponent ] ,
12
22
imports : [
13
23
CommonModule ,
14
24
BrowserModule ,
25
+ RouterModule . forRoot ( appRoutes ) ,
15
26
JsonApiNestjsSdkModule . forRoot (
16
27
{
17
28
apiPrefix : '/api/v1' ,
18
29
apiHost : window . location . origin ,
19
30
} ,
20
- { BookList , Users, Roles, Comments, Addresses }
31
+ { Users, Roles, Comments, Addresses }
21
32
) ,
22
33
] ,
23
34
providers : [ ] ,
0 commit comments