Last active
July 7, 2020 20:44
-
-
Save negue/0b17fb71e11d38110ea8fa9ed6402794 to your computer and use it in GitHub Desktop.
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
<ng-container *ngFor="let item of reverseStrings$ | async"> | |
<ng-container | |
[ngTemplateOutlet]="string" | |
[ngTemplateOutletContext]="item" | |
></ng-container> | |
</ng-container> | |
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
import { Subject } from 'rxjs'; | |
import { map } from 'rxjs/operators'; | |
strings$ = new Subject<any[]>(); | |
reverseStrings$ = this.strings$.pipe( | |
map(str => str.reverse()) | |
) | |
this.strings$.next(newString); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment