Read-only signals in Angular let you share values between components safely. They update automatically when the original signal changes.
They can't be changed directly, like computed signals. And, they are useful in services.
[00:00] Create a new property and call the as read only method on an existing signal. A read only signal holds the very same value as the original signal. And whenever the original signal value gets updated, read only also gets updated. Let's display the value of our read only [00:20] signal here in the handle click. So we're going to read the value of the read only items. So whenever we click log items, we will see what are the values. And whenever we update the value of our signal and we log once again, we will see that both the [00:40] original signal items and its read only version both get updated. The whole point of a read only signal, as the name suggests, is that we should not be able to modify the value. So neither the set nor the update method exist on a read only signal. However, if we take just an ordinary signal, [01:00] which appears to be a writable signal, then both the set method and the update method are present. A computed signal shares the same type as read only signals, so the main signal type, which doesn't have the state and update method. That's because the value of a computed [01:19] signal is a computation depending on another signal. In this case, last item depends on these dot items. Changing a value of a computed signal would be illogical, and therefore this dot last item dot set and update, they don't exist. Read only signals are not very useful within [01:39] components, but they are super useful within services.