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';
const routes: Routes = [
{ path: 'auth', loadChildren: './pages/auth/auth.module#AuthModule' },
{ path: 'auth', loadChildren: './pages/auth/auth.module#AuthModule' }
];
@NgModule({

View File

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

View File

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

View File

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

View File

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