Something went wrong. Try again.
Some angular code i wrote while following: Angular - The Complete Guide (2025 Edition)
Something went wrong. Try again.
524 B · 21 lines
TypeScript
at master
12345678910111213141516171819202122import { Component, inject, signal } from '@angular/core';import { FormsModule } from '@angular/forms';
import { AuthService } from './auth.service';
@Component({ selector: 'app-auth', standalone: true, imports: [FormsModule], templateUrl: './auth.component.html', styleUrl: './auth.component.css',})export class AuthComponent { email = signal(''); password = signal(''); private authService = inject(AuthService);
onSubmit() { this.authService.authenticate(this.email(), this.password()); }}