in Angular by
What is multicasting in Angular?

1 Answer

0 votes
by

Multicasting or Multi-casting is the practice of broadcasting to a list of multiple subscribers in a single execution.

Let's take a simple example to demonstrate the multi-casting feature:

  1. var source = Rx.Observable.from([123]);  
  2. var subject = new Rx.Subject();  
  3. var multicasted = source.multicast(subject);  
  4. // These are, under the hood, `subject.subscribe({...})`:  
  5. multicasted.subscribe({  
  6.   next: (v) => console.log('observerA: ' + v)  
  7. });  
  8. multicasted.subscribe({  
  9.   next: (v) => console.log('observerB: ' + v)  
  10. });  

Related questions

0 votes
asked Jun 6 in Angular by john ganales
0 votes
asked Jun 6 in Angular by john ganales
0 votes
asked Jun 6 in Angular by john ganales
...