mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
18 lines
423 B
TypeScript
18 lines
423 B
TypeScript
import { Component, EventEmitter, input, Output } from '@angular/core';
|
|
|
|
type Post = { title: string; description: string; pictureLink: string };
|
|
|
|
@Component({
|
|
standalone: true,
|
|
selector: 'app-post',
|
|
template: `
|
|
<div></div>
|
|
`,
|
|
styles: [''],
|
|
})
|
|
export class PostComponent {
|
|
post = input<Post | undefined>(undefined);
|
|
isSelected = input<boolean>(false);
|
|
@Output() selectPost = new EventEmitter<void>();
|
|
}
|