For Example using @if, I am able to do this: @if(items$ | async; as items). I am able to declare 'items' as a variable holding the array of items using the 'as' keyword in the template.
How can I achieve the same thing using @defer?
Something like: @defer(when items$ | async; as items)
I tried @defer(when items$ | async; as items) but angular template does not like it.
Deferred view work perfectly well with observables or promises, but your
as itemsis not a valid option for the@defercontrol flow. You'll have to move that to a@forblock instead.