This commit is contained in:
crusader 2018-01-26 21:46:37 +09:00
parent 948999efae
commit 0dfc2fe55b
10 changed files with 100 additions and 12 deletions

View File

@ -2,6 +2,8 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { AuthComponent } from './auth.component'; import { AuthComponent } from './auth.component';
import { SigninComponent } from './signin/signin.component'; import { SigninComponent } from './signin/signin.component';
import { SignupComponent } from './signup/signup.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
const routes: Routes = [ const routes: Routes = [
{ {
@ -10,6 +12,8 @@ const routes: Routes = [
children: [ children: [
{ path: '', redirectTo: 'signin' }, { path: '', redirectTo: 'signin' },
{ path: 'signin', component: SigninComponent }, { path: 'signin', component: SigninComponent },
{ path: 'signup', component: SignupComponent },
{ path: 'reset-password', component: ResetPasswordComponent },
] ]
} }
]; ];

View File

@ -1,25 +1,23 @@
import { NgModule } from '@angular/core'; 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 './auth.component';
import { SigninComponent } from 'app/pages/auth/signin/signin.component'; import { AuthRoutingModule } from './auth-routing.module';
import { SigninComponent } from './signin/signin.component';
import { SignupComponent } from './signup/signup.component';
import { ResetPasswordComponent } from './reset-password/reset-password.component';
export const appRoutes: Routes = [
// {
// path: '', component: AuthComponent, children: [
// { path: 'signin', component: SigninComponent },
// ]
// }
{ path: 'signin', component: SigninComponent },
];
@NgModule({ @NgModule({
imports: [ imports: [
CommonModule, CommonModule,
RouterModule.forChild(appRoutes), AuthRoutingModule,
], ],
declarations: [ declarations: [
SigninComponent AuthComponent,
SigninComponent,
SignupComponent,
ResetPasswordComponent,
] ]
}) })
export class AuthModule { } export class AuthModule { }

View File

@ -0,0 +1,3 @@
<p>
reset-password works!
</p>

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ResetPasswordComponent } from './reset-password.component';
describe('ResetPasswordComponent', () => {
let component: ResetPasswordComponent;
let fixture: ComponentFixture<ResetPasswordComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ResetPasswordComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ResetPasswordComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-reset-password',
templateUrl: './reset-password.component.html',
styleUrls: ['./reset-password.component.scss']
})
export class ResetPasswordComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

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

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SignupComponent } from './signup.component';
describe('SignupComponent', () => {
let component: SignupComponent;
let fixture: ComponentFixture<SignupComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SignupComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SignupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'of-signup',
templateUrl: './signup.component.html',
styleUrls: ['./signup.component.scss']
})
export class SignupComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}