File tree 2 files changed +20
-9
lines changed
schematics/page/files/__name@dasherize@if-flat__ 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change
1
+ import { NgModule } from '@angular/core' ;
2
+ import { Routes , RouterModule } from '@angular/router' ;
3
+
4
+ import { < %= classify ( name ) % > Page } from './<%= dasherize(name) %>.page' ;
5
+
6
+ const routes : Routes = [
7
+ {
8
+ path : '' ,
9
+ component : < %= classify ( name ) % > Page
10
+ }
11
+ ] ;
12
+
13
+ @NgModule ( {
14
+ imports : [ RouterModule . forChild ( routes ) ] ,
15
+ exports : [ RouterModule ] ,
16
+ } )
17
+ export class < %= classify ( name ) % > PageRoutingModule { }
Original file line number Diff line number Diff line change 1
1
import { NgModule } from '@angular/core' ;
2
2
import { CommonModule } from '@angular/common' ;
3
3
import { FormsModule } from '@angular/forms' ;
4
- import { Routes , RouterModule } from '@angular/router' ;
5
4
6
5
import { IonicModule } from '@ionic/angular' ;
7
6
8
- import { < %= classify ( name ) % > Page } from './<%= dasherize(name) %>.page ' ;
7
+ import { < %= classify ( name ) % > PageRoutingModule } from './<%= dasherize(name) %>-routing.module ' ;
9
8
10
- const routes : Routes = [
11
- {
12
- path : '' ,
13
- component : < %= classify ( name ) % > Page
14
- }
15
- ] ;
9
+ import { < %= classify ( name ) % > Page } from './<%= dasherize(name) %>.page' ;
16
10
17
11
@NgModule ( {
18
12
imports : [
19
13
CommonModule ,
20
14
FormsModule ,
21
15
IonicModule ,
22
- RouterModule . forChild ( routes )
16
+ < %= classify ( name ) % > PageRoutingModule
23
17
] ,
24
18
declarations : [ < %= classify ( name ) % > Page ]
25
19
} )
You can’t perform that action at this time.
0 commit comments