In Angular 2 I have a component with a template.
In the component TypeScript code i create a Reactive Extensions Observable (items$
) and use it in an ngFor
-directive in the template with an async-pipe.
This way I do not have to worry about subscribing and unsubscribing myself.
<div *ngFor="let item of items$ | async"></div>
...
</div>
Now from the component code I would like to access the list of items, but without subscribing to it. Is there a way from the template to hand back a copy of or reference to the items list?