Files
rutero/route-planner/src/app/public/login/login.component.ts
T
2026-08-27 17:29:18 -04:00

30 lines
709 B
TypeScript

import { Component, ChangeDetectionStrategy } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@Component({
standalone: true,
selector: 'app-login',
imports: [CommonModule, FormsModule],
templateUrl: './login.component.html',
styleUrls: ['./login.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class LoginComponent {
email = '';
password = '';
loading = false;
constructor(private router: Router) {}
login() {
this.loading = true;
setTimeout(() => {
this.loading = false;
this.router.navigate(['/home']);
}, 1500);
}
}