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, MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule, MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule, MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule MatAutocompleteModule, MatFormFieldModule
} from '@angular/material'; } from '@angular/material';
const MATERIAL_MODULES: any[] = [ const MATERIAL_MODULES: any[] = [
@ -15,7 +15,7 @@ const MATERIAL_MODULES: any[] = [
MatSlideToggleModule, MatInputModule, MatCheckboxModule, MatSlideToggleModule, MatInputModule, MatCheckboxModule,
MatToolbarModule, MatSnackBarModule, MatSidenavModule, MatToolbarModule, MatSnackBarModule, MatSidenavModule,
MatTabsModule, MatSelectModule, MatRadioModule, MatTabsModule, MatSelectModule, MatRadioModule,
MatAutocompleteModule, MatAutocompleteModule, MatFormFieldModule
]; ];
@NgModule({ @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 { CommonModule } from '@angular/common';
import { RouterModule, Routes } from '@angular/router'; import { RouterModule, Routes } from '@angular/router';
import { AuthComponent } from 'app/pages/auth/auth.component'; import { AuthComponent } from 'app/pages/auth/auth.component';
import { SigninComponent } from 'app/pages/auth/signin/signin.component';
export const appRoutes: Routes = [{ export const appRoutes: Routes = [
path: '', component: AuthComponent, children: [ // {
{ path: 'signin', loadChildren: './signin/signin.module#SigninModule' } // path: '', component: AuthComponent, children: [
] // { path: 'signin', component: SigninComponent },
} // ]
// }
{ path: 'signin', component: SigninComponent },
]; ];
@NgModule({ @NgModule({
@ -16,7 +19,7 @@ export const appRoutes: Routes = [{
RouterModule.forChild(appRoutes), RouterModule.forChild(appRoutes),
], ],
declarations: [ declarations: [
AuthComponent SigninComponent
] ]
}) })
export class AuthModule { } export class AuthModule { }

View File

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