File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed
schematics/page/files/__name@dasherize@if-flat__ Expand file tree Collapse file tree 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 11import { NgModule } from '@angular/core' ;
22import { CommonModule } from '@angular/common' ;
33import { FormsModule } from '@angular/forms' ;
4- import { Routes , RouterModule } from '@angular/router' ;
54
65import { IonicModule } from '@ionic/angular' ;
76
8- import { < %= classify ( name ) % > Page } from './<%= dasherize(name) %>.page ' ;
7+ import { < %= classify ( name ) % > PageRoutingModule } from './<%= dasherize(name) %>-routing.module ' ;
98
10- const routes : Routes = [
11- {
12- path : '' ,
13- component : < %= classify ( name ) % > Page
14- }
15- ] ;
9+ import { < %= classify ( name ) % > Page } from './<%= dasherize(name) %>.page' ;
1610
1711@NgModule ( {
1812 imports : [
1913 CommonModule ,
2014 FormsModule ,
2115 IonicModule ,
22- RouterModule . forChild ( routes )
16+ < %= classify ( name ) % > PageRoutingModule
2317 ] ,
2418 declarations : [ < %= classify ( name ) % > Page ]
2519} )
You can’t perform that action at this time.
0 commit comments