This accepts a sequence of values, and moves to the next value after every call to next. The sequence can be something as simple as an array of two values to toggle between states, or as complex as a sequence generated by a function.
This signal can accept anything that implements the Iterator
spec or that matches the ArrayLike
interface. A special type called Cursor
can also be provided to allow more custom behavior. This type is very similar to an Iterator
, but has explicit methods to reset and move to specific values.
This signal has set
and update
methods like any writeable signal. These methods will throw errors if the values aren't present in the sequence.
This uses an iterator to move through a sequence of fibonacci numbers.
This will use a radio button to select a choice, and will update the model binding to the selected choice.