Skip to content

Instantly share code, notes, and snippets.

@uxder
Created February 8, 2017 02:21
Show Gist options
  • Save uxder/b7b84d8c82d92849ca269c61a8c95abf to your computer and use it in GitHub Desktop.
Save uxder/b7b84d8c82d92849ca269c61a8c95abf to your computer and use it in GitHub Desktop.
Mike example
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
class ExampleForMike {
private userStream$: BehaviorSubject<any>;
public getStream():BehaviorSubject<> {
return this.userStream$;
}
public getNameStream():BehaviorSubject<> {
return this.userStream$.map((data) => { return data.firstName + ' ' + data.lastName }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment