ing
This commit is contained in:
parent
9730a00827
commit
a81dca3232
|
@ -3,7 +3,7 @@
|
|||
<a class="redirect" [routerLink]="['/auth/signup']">Register an account</a>
|
||||
</mat-card-title>
|
||||
<mat-card-content>
|
||||
<form fxLayout="column" fxLayoutAlign="start stretch" [formGroup]="signinForm" (ngSubmit)="login()">
|
||||
<form fxLayout="column" fxLayoutAlign="start stretch" [formGroup]="signinForm" (ngSubmit)="signin()">
|
||||
<mat-form-field class="full-width">
|
||||
<input type="email" id="email" class="input" placeholder="Please enter your email"
|
||||
formControlName="email" required matInput>
|
||||
|
@ -19,7 +19,7 @@
|
|||
{{ formErrors.password }}
|
||||
</div>
|
||||
<!--[disabled]="!signinForm.valid"-->
|
||||
<button mat-raised-button color="accent" type="submit" (click)="signin()">log in</button>
|
||||
<button mat-raised-button color="accent" type="submit">Sign In</button>
|
||||
</form>
|
||||
</mat-card-content>
|
||||
|
|
@ -3,7 +3,7 @@ import { Router } from '@angular/router';
|
|||
import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import * as AuthStore from '../store/auth';
|
||||
import * as AuthStore from '../../store/auth';
|
||||
|
||||
@Component({
|
||||
selector: 'of-member-signin',
|
||||
|
@ -22,7 +22,9 @@ export class SigninComponent implements OnInit {
|
|||
private router: Router,
|
||||
private store: Store<AuthStore.State>,
|
||||
private formBuilder: FormBuilder,
|
||||
) { }
|
||||
) {
|
||||
console.log(this.store);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.initForm();
|
||||
|
@ -52,7 +54,8 @@ export class SigninComponent implements OnInit {
|
|||
signupBtnClick() {
|
||||
this.router.navigateByUrl('/auth/signup');
|
||||
}
|
||||
login() {
|
||||
console.log('signin component login fnc');
|
||||
signin() {
|
||||
this.store.dispatch(new AuthStore.Signin(this.signinForm.value));
|
||||
console.log('signin component signin fnc');
|
||||
}
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
export const MODULE = {
|
||||
name: 'Member'
|
||||
name: 'member'
|
||||
};
|
||||
|
|
|
@ -5,10 +5,10 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||
|
||||
import { MaterialModule } from 'app/commons/ui/material/material.module';
|
||||
|
||||
import { ModifyComponent } from './component/modify.component';
|
||||
import { SigninComponent } from './component/signin.component';
|
||||
import { SignupComponent } from './component/signup.component';
|
||||
import { ResetPasswordComponent } from './component/reset-password.component';
|
||||
import { ModifyComponent } from './component/modify/modify.component';
|
||||
import { SigninComponent } from './component/signin/signin.component';
|
||||
import { SignupComponent } from './component/signup/signup.component';
|
||||
import { ResetPasswordComponent } from './component/reset-password/reset-password.component';
|
||||
import { MemberService } from './service/member.service';
|
||||
import { AuthGuard } from './guard/auth.guard';
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user