mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-12 13:53:03 -05:00
feat: challenge 45 React in Angular
Add new challenge: React in Angular.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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>();
|
||||
}
|
||||
Reference in New Issue
Block a user