aboutsummaryrefslogtreecommitdiff
path: root/ufund-ui/src/app/components/login/login.component.ts
blob: 9a4eb0fc3dffea6882488f78ec1c87ceaf0f5723 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { Component } from '@angular/core'
import {UsersService} from '../../services/users.service';

@Component({
  selector: 'app-login',
  standalone: false,
  templateUrl: './login.component.html',
  styleUrl: './login.component.css'
})
export class LoginComponent {
    constructor(
        protected usersService: UsersService
    ) {}

    login(username: string | null, password: string | null) {
        console.log(`attempting to log in with ${username} ${password}`)
        if (!username || !password) {
            return;
        }

        this.usersService.login(username, password)
    }
}