mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 21:03:03 -05:00
feat(): challenge 58
This commit is contained in:
@@ -8,7 +8,6 @@ challengeNumber: 57
|
||||
command: angular-content-projection-default
|
||||
sidebar:
|
||||
order: 22
|
||||
badge: New
|
||||
---
|
||||
|
||||
## Information
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
title: 🟠 Content Projection Condition
|
||||
description: Challenge 58 is about conditional content projection in Angular
|
||||
author: thomas-laforge
|
||||
contributors:
|
||||
- tomalaforge
|
||||
challengeNumber: 58
|
||||
command: angular-content-projection-condition
|
||||
sidebar:
|
||||
order: 124
|
||||
badge: New
|
||||
---
|
||||
|
||||
## Information
|
||||
|
||||
Content projection in Angular allows you to create flexible and reusable components by dynamically inserting content from a parent component using `<ng-content>`. However, debugging content projection issues can sometimes be tricky.
|
||||
|
||||
In this challenge, we have a `CardComponent` that supports a small mode, which conditionally changes how the projected content is displayed. However, there is a bug: when `small` is `false`, the card does not render properly.
|
||||
|
||||
Your task is to identify and fix this issue without adding `inputs` while ensuring that the intended behavior remains unchanged.
|
||||
|
||||
## Statement
|
||||
|
||||
Your goal is to fix the issue where the `CardComponent` does not render when `small` is `false`.
|
||||
|
||||
## Steps to complete:
|
||||
|
||||
- Analyze how the `small` property is used inside the template.
|
||||
- Identify why the content is not displayed when `small` is `false`.
|
||||
- Modify the component to ensure that both cases (`small` = `true` and `small` = `false`) work as expected, while keeping the same structure and behavior.
|
||||
- Ensure that no new `input` properties are introduced in the component.
|
||||
|
||||
## Constraints
|
||||
|
||||
- You must not add any new `input` properties.
|
||||
- The expected UI and behavior must remain unchanged.
|
||||
- The `@if` directive must be correctly handled to ensure content projection works.
|
||||
- Do not introduce additional services or state management solutions.
|
||||
- The fix should be minimal and focused on resolving the rendering issue.
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Ir al Desafío más reciente
|
||||
link: /es/challenges/angular/57-content-projection-default/
|
||||
link: /es/challenges/angular/58-content-projection-condition/
|
||||
icon: rocket
|
||||
- text: Dar una estrella
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="57 Desafíos">
|
||||
Este repositorio contiene 57 Desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
|
||||
<Card title="58 Desafíos">
|
||||
Este repositorio contiene 58 Desafíos relacionados con <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> y <b>Typescript</b>.
|
||||
Estos desafíos se resuelven en torno a problemas de la vida real o características específicas para mejorar tus habilidades.
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Aller au dernier Challenge
|
||||
link: /fr/challenges/angular/57-content-projection-default/
|
||||
link: /fr/challenges/angular/58-content-projection-condition/
|
||||
icon: rocket
|
||||
- text: Donne une étoile
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="57 Défis">
|
||||
Ce répertoire rassemble 57 Défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
|
||||
<Card title="58 Défis">
|
||||
Ce répertoire rassemble 58 Défis liés à <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> et <b>Typescript</b>. Ces défis portent sur des problèmes réels ou des fonctionnalités spécifiques pour améliorer vos compétences.
|
||||
</Card>
|
||||
|
||||
<Card title="Subscribe to get notify of latest challenges">
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Go to the latest Challenge
|
||||
link: /challenges/angular/57-content-projection-default/
|
||||
link: /challenges/angular/58-content-projection-condition/
|
||||
icon: rocket
|
||||
- text: Give a star
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -27,8 +27,8 @@ import MyIcon from '../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="57 Challenges">
|
||||
This repository gathers 57 Challenges related to <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
|
||||
<Card title="58 Challenges">
|
||||
This repository gathers 58 Challenges related to <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>, <b>Ngrx</b> and <b>Typescript</b>.
|
||||
These challenges resolve around real-life issues or specific features to elevate your skills.
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Ir para o desafio mais recente
|
||||
link: /pt/challenges/angular/57-content-projection-default/
|
||||
link: /pt/challenges/angular/58-content-projection-condition/
|
||||
icon: rocket
|
||||
- text: Dar uma estrela
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
@@ -26,8 +26,8 @@ import MyIcon from '../../../components/MyIcon.astro';
|
||||
import SubscriptionForm from '../../../components/SubscriptionForm.astro';
|
||||
|
||||
<CardGrid>
|
||||
<Card title="57 Desafios">
|
||||
Este repositório possui 57 Desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
|
||||
<Card title="58 Desafios">
|
||||
Este repositório possui 58 Desafios relacionados a <b>Angular</b>, <b>Nx</b>, <b>RxJS</b>,
|
||||
<b>Ngrx</b> e <b>Typescript</b>.
|
||||
Esses desafios são voltados para problemas reais ou funcionalidades específicas afim de
|
||||
melhorar suas habilidades.
|
||||
|
||||
@@ -13,7 +13,7 @@ hero:
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: Перейти к последней задаче
|
||||
link: /ru/challenges/angular/57-content-projection-default/
|
||||
link: /ru/challenges/angular/58-content-projection-condition/
|
||||
icon: rocket
|
||||
- text: Добавить звезду
|
||||
link: https://github.com/tomalaforge/angular-challenges
|
||||
|
||||
Reference in New Issue
Block a user