-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Answer: 1 Angular Projection #1407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| }) | ||
| export class CardListItemTemplateDirective { | ||
| constructor(public template: TemplateRef<any>) {} | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, you could even type your directive
| exportAs: 'appCardListItem', | ||
| }) | ||
| export class CardListItemTemplateDirective { | ||
| constructor(public template: TemplateRef<any>) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: use inject function
|
|
||
| @Directive({ | ||
| selector: 'ng-template[appCardListItem]', | ||
| standalone: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default flag
|
That's perfect. great work |
Checklist for challenge submission
Warning:
Alternatively, you can still submit your PR to join the list of answered challenges or to be reviewed by a community member. 🔥