Skip to content

Conversation

@tomalaforge
Copy link
Owner

solution projection

  • with signals and signals queries
  • strongly typed template outlet

@tomalaforge tomalaforge added 1 exercice projection answer author answer of author labels Apr 14, 2024
@github-actions github-actions bot added answer answer contributor highly contributing to the project labels Apr 14, 2024
@tomalaforge tomalaforge removed answer answer contributor highly contributing to the project labels Apr 14, 2024
@tomalaforge tomalaforge changed the title Answer:1 projection Answer:1 projection with signals and all v17 features Apr 15, 2024
@github-actions github-actions bot added contributor highly contributing to the project answer answer labels Apr 15, 2024
@tomalaforge tomalaforge removed answer answer contributor highly contributing to the project labels Apr 15, 2024

addOne(student: Student) {
this.students.next([...this.students.value, student]);
this.students.set([...this.students(), student]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use update here?

Choose a reason for hiding this comment

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

you can use "update" too to get previous value and add new student, but since u current have the students list, u can also use the set() method

],
standalone: true,
imports: [CardComponent],
imports: [ListItemComponent, AsyncPipe, CardRowDirective, CardComponent],

Choose a reason for hiding this comment

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

there is no need for the asyncPipe here, unused import

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 exercice projection answer author answer of author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants