We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef9f87d commit 6c3a104Copy full SHA for 6c3a104
src/app/books/book-list.component.ts
@@ -15,6 +15,9 @@ export class BookListComponent {
15
computation: books => books[0]
16
});
17
18
+ // this also works (shorthand version)
19
+ // firstBook = linkedSignal(() => this.books()[0]);
20
+
21
overrideFirstBook() {
22
// Manually updating `firstBook`, which now returns 'jQuery'
23
this.firstBook.set('jQuery');
src/app/books/book/book.component.ts
@@ -20,7 +20,6 @@ export class BookComponent {
// this also works:
// rating = linkedSignal(() => this.book().rating);
-
24
doRateUp() {
25
const newRating = this.rating() + 1;
26
this.rating.set(newRating);
0 commit comments