Complete the code to create a signal in Angular.
const count = [1](0);
Signals in Angular are created using the signal function.
Complete the code to subscribe to an observable in Angular.
myObservable.[1](() => console.log('Data received'));
To listen to values from an observable, you use the subscribe method.
Fix the error in the code to update a signal's value.
count.[1]((val) => val + 1);
Signals use the update method to change their value based on the current value.
Fill both blanks to create an observable from a signal and subscribe to it.
const obs = toObservable([1]); obs.[2](() => console.log('Signal changed'));
You convert a signal to an observable using toObservable and then subscribe to it with subscribe.
Fill all three blanks to create a signal, convert it to an observable, and subscribe to it.
const [1] = [2](0); const obs = toObservable([3]); obs.subscribe(() => console.log('Value changed'));
First, create a signal named count using signal. Then convert count to an observable.
