Declare it
private obs = new Subject<string>();
public _obs = this.obs.asObservable();
it is public so you can subscribe to it from any other component
Use it any where within the class
anyMethod( ) {
this.obs.next( data );
}
Declare it
private obs = new Subject<string>();
public _obs = this.obs.asObservable();
it is public so you can subscribe to it from any other component
Use it any where within the class
anyMethod( ) {
this.obs.next( data );
}