Skip to content

Instantly share code, notes, and snippets.

@chani24
Last active July 15, 2020 15:40
Show Gist options
  • Save chani24/1dca2d5d2f315fa0500c1cab0dff289a to your computer and use it in GitHub Desktop.
Save chani24/1dca2d5d2f315fa0500c1cab0dff289a to your computer and use it in GitHub Desktop.
import { Component, OnInit } from '@angular/core';
import { NgForm } from '@angular/forms';
import { AuthService } from '../auth.service';
import { Router, RoutesRecognized } from '@angular/router';
import { AppRoutingModule } from '../app-routing.module'
@Component({
selector: 'app-signin',
templateUrl: './signin.component.html',
styleUrls: ['./signin.component.css']
})
export class SigninComponent implements OnInit {
constructor(private authservice: AuthService, private router: Router) { }
ngOnInit(): void {
}
signUserIn(form: NgForm){
this.authservice.signIn(form.value.email, form.value.password)
form.resetForm();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment