-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(routing): split out routes into routing module (#181)
- Loading branch information
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
schematics/page/files/__name@dasherize@if-flat__/__name@dasherize__-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { Routes, RouterModule } from '@angular/router'; | ||
|
||
import { <%= classify(name) %>Page } from './<%= dasherize(name) %>.page'; | ||
|
||
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: <%= classify(name) %>Page | ||
} | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule], | ||
}) | ||
export class <%= classify(name) %>PageRoutingModule {} |
12 changes: 3 additions & 9 deletions
12
schematics/page/files/__name@dasherize@if-flat__/__name@dasherize__.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters