SHARE
TWEET

Untitled

a guest Aug 21st, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { Subject } from 'rxjs';
  2.  
  3. class DefaultMessageBus {
  4.   private messagesSubject = new Subject<string>();
  5.  
  6.   readonly messages$ = this.messagesSubject.asObservable();
  7.  
  8.   sendMessage(message: string) {
  9.     this.messagesSubject.next(message);
  10.   }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top