Route testing

This commit is contained in:
insanity 2018-01-25 19:21:48 +09:00
parent 2798af403d
commit ac267b8437
4 changed files with 15 additions and 23 deletions

View File

@ -6,7 +6,7 @@ import {
MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule
MatAutocompleteModule, MatFormFieldModule
} from '@angular/material';
const MATERIAL_MODULES: any[] = [
@ -15,7 +15,7 @@ const MATERIAL_MODULES: any[] = [
MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule,
MatAutocompleteModule, MatFormFieldModule
];
@NgModule({

View File

@ -1 +1 @@
<div>signin</div>
<div>login</div>

View File

@ -2,12 +2,15 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router';
import { AuthComponent } from 'app/pages/auth/auth.component';
import { SigninComponent } from 'app/pages/auth/signin/signin.component';
export const appRoutes: Routes = [{
path: '', component: AuthComponent, children: [
{ path: 'signin', loadChildren: './signin/signin.module#SigninModule' }
]
}
export const appRoutes: Routes = [
// {
// path: '', component: AuthComponent, children: [
// { path: 'signin', component: SigninComponent },
// ]
// }
{ path: 'signin', component: SigninComponent },
];
@NgModule({
@ -16,7 +19,7 @@ export const appRoutes: Routes = [{
RouterModule.forChild(appRoutes),
],
declarations: [
AuthComponent
SigninComponent
]
})
export class AuthModule { }

View File

@ -1,22 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SigninComponent } from './signin.component';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
{ path: '', component: SigninComponent },
];
import { SigninComponent } from 'app/packages/member/signin/signin.component';
@NgModule({
imports: [
CommonModule,
RouterModule.forChild(routes)
CommonModule
],
declarations: [
SigninComponent,
],
exports: [
RouterModule,
]
declarations: [ SigninComponent ]
})
export class SigninModule { }