Skip to content

Instantly share code, notes, and snippets.

@negue
Last active July 7, 2020 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save negue/0b17fb71e11d38110ea8fa9ed6402794 to your computer and use it in GitHub Desktop.
Save negue/0b17fb71e11d38110ea8fa9ed6402794 to your computer and use it in GitHub Desktop.
<ng-container *ngFor="let item of reverseStrings$ | async">
<ng-container
[ngTemplateOutlet]="string"
[ngTemplateOutletContext]="item"
></ng-container>
</ng-container>
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