This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const filterLoggedIn$ = (stream$) => { | |
| return stream$.pipe( | |
| withLatestFrom(iceCreamAuth$), | |
| filter((auth) => auth) | |
| ) | |
| }; | |
| const combinedInfoFactory$ = ( | |
| iceCreamPreferences$, | |
| iceCreamInventory$, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class AppComponent { | |
| onDestroy$ = new Subject(); | |
| count = 5; | |
| ngOnInit () { | |
| this.iceCreams$ = fromEvent(window, 'resize').pipe( | |
| flatMap(() => fromPromise(fetchIceCreams(this.count))), | |
| takeUntil(this.onDestroy$) | |
| ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AppComponent { | |
| constructor () { | |
| this.count = 5; | |
| this.onResize = this._onResize.bind(this); | |
| } | |
| componentDidMount () { | |
| window.addEventListener('resize', this.onResize) | |
| } |
OlderNewer