Skip to content

Answer:59 #1280

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tsironis13
Copy link
Contributor

@tsironis13 tsironis13 commented Apr 4, 2025

Second solution for challenge n59.
The idea is to deligate the post http resource logic handling to dedicate directive.
The component calls the needed resource signal properties only when the card content is expanded.
By using such approach, the conditional logic to trigger the http resource is not needed.

@github-actions github-actions bot added 59 answer answer contributor highly contributing to the project to be reviewed PR requests a review labels Apr 4, 2025
@@ -41,14 +66,29 @@ import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
class="overflow-hidden transition-[max-height] duration-500"
[class.max-h-0]="!isExpanded()"
[class.max-h-[1000px]]="isExpanded()">
<ng-content />
@defer (on interaction(expandContentButton)) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, yes and yes
I was looking for this solution. There were a hint in the title. But I think I will create a second challenge for people to guess this solution.

Great job. 🔥

@tomalaforge tomalaforge removed the to be reviewed PR requests a review label May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
59 answer answer contributor highly contributing to the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants