• Overview
@angular/core/rxjs-interop

rxResource

function

API

  
    
  
  
function rxResource<T, R>(opts: RxResourceOptions<T, R> & { defaultValue: NoInfer<T>; }): ResourceRef<T>;

Like resource but uses an RxJS based loader which maps the request to an Observable of the resource's value.

@paramoptsRxResourceOptions<T, R> & { defaultValue: NoInfer<T>; }
@returnsResourceRef<T>
function rxResource<T, R>(opts: RxResourceOptions<T, R>): ResourceRef<T | undefined>;

Like resource but uses an RxJS based loader which maps the request to an Observable of the resource's value.

@paramoptsRxResourceOptions<T, R>
@returnsResourceRef<T | undefined>
Jump to details