login-view.component.ts 518 B

12345678910111213141516171819202122
  1. import {Component} from '@angular/core';
  2. import {AuthService} from "../auth-service/auth.service";
  3. @Component({
  4. selector: 'app-login-view',
  5. templateUrl: './login-view.component.html',
  6. styleUrls: ['./login-view.component.css']
  7. })
  8. export class LoginViewComponent {
  9. formData: any = {};
  10. constructor(private authService: AuthService) {
  11. }
  12. login() {
  13. console.log("login attempt")
  14. console.log(this.formData)
  15. this.authService.login(
  16. this.formData.username,
  17. this.formData.password)
  18. }
  19. }