Route testing

This commit is contained in:
insanity 2018-01-25 18:50:46 +09:00
parent 276677bed8
commit 2798af403d
6 changed files with 7 additions and 11 deletions

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [ const routes: Routes = [
{ path: 'auth', loadChildren: './pages/auth/auth.module#AuthModule' }, { path: 'auth', loadChildren: './pages/auth/auth.module#AuthModule' }
]; ];
@NgModule({ @NgModule({

View File

@ -1,3 +1 @@
<p> <div>signin</div>
signin works!
</p>

View File

@ -1,4 +1 @@
<p>
auth works!
</p>
<router-outlet></router-outlet> <router-outlet></router-outlet>

View File

@ -5,7 +5,7 @@ import { AuthComponent } from 'app/pages/auth/auth.component';
export const appRoutes: Routes = [{ export const appRoutes: Routes = [{
path: '', component: AuthComponent, children: [ path: '', component: AuthComponent, children: [
{ path: 'signin', loadChildren: './signin/signin.module#SigninModule' }, { path: 'signin', loadChildren: './signin/signin.module#SigninModule' }
] ]
} }
]; ];

View File

@ -1,3 +1,3 @@
<p> <p>
signin works! signin works!
</p> </p>

View File

@ -9,10 +9,11 @@ const routes: Routes = [
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule CommonModule,
RouterModule.forChild(routes)
], ],
declarations: [ declarations: [
SigninComponent SigninComponent,
], ],
exports: [ exports: [
RouterModule, RouterModule,