Something went wrong. Try again.
Some angular code i wrote while following: Angular - The Complete Guide (2025 Edition)
Something went wrong. Try again.
1234567891011121314151617181920212223242526import { Component, Input, Output, EventEmitter } from '@angular/core';
import { type User } from './user.model';import { CardComponent } from "../shared/card/card.component";
@Component({ selector: 'app-user', standalone: true, templateUrl: './user.component.html', styleUrl: './user.component.css', imports: [CardComponent]})export class UserComponent { @Input({ required: true }) user!: User; @Input({required: true}) selected!: boolean; @Output() select = new EventEmitter<string>();
get imagePath() { return 'assets/users/' + this.user.avatar; }
onSelectUser() { this.select.emit(this.user.id); }}