Angular 2 - Using Observables in a component to emit values to other components
问题 I am wondering if it is possible to use Observables in components, and which other components can subscribe to? BugListComponent - component is injected in the boot.ts file where I load all my services (where boostrap is located) import {Subject, BehaviorSubject} from 'rxjs/Rx'; viewBugList$: Subject<boolean>; constructor() { this.viewBugList$ = new BehaviorSubject<boolean>(false); } // Called from template, sends in 'true' private enableIEview(enable: boolean) { if(enable) { this.viewBugList