joanllenas/ngx-remotedata

API request - add possibility to create template with directives

pogiaron opened this issue · 1 comments

I think it would be nice to use ngx-remotedata like this:

<div [remoteData]="service.state">
  <div *isNotAsked>Not asked...</div>
  <div *isLoading>Loading...</div>
  <div *isSuccess #success="successVal">Success...</div>
  <div *isFailure #error="errorVal">Failure...</div>
</div>

What do you think?

HI @pogiaron ,
I don't see any issues with this approach.
But, what are the benefits of using structural directives here?