LiveLoveApp logo

Exercise - Connectable


The goal of this exercise is to learn how to create a multicasted Observable.

  1. Open exercise on codesandbox. I've already imported the necessary rxjs functions and classes for you. I also created a new observable using the interval() function that will emit a value every 1000 milliseconds.
  2. Use the connectable function to create a new connectable Observable from the source observable.
  3. Subscribe to the connectable observable and log out the next notification values.
  4. Connect the subject to the multicasted observable.


Provide the connecting Subject.

  1. Define a new Subject().
  2. Provide the ConnectableConfig and specify the connector property with a function that returns a reference the Subject.