I am trying to build crud service in angular using rxjs. I have product-service to communicate with backend with getall,getbyid,post,pust,delete methods and top of that
product-facade-service which act as a store/service and exposes public api for component which is as follows :
import { CrudAction, CrudOperation } from 'src/app/shared/facade-base';
@Injectable({
providedIn: 'root'
})
export class ProductFacadeService {
constructor(private productService: ProductClient) { }
// All products
getProducts$ = this.productService.get()
.pipe(
tap(data => console.log('Products', JSON.stringify(data))),
//shareReplay({bufferSize:1, refCount:1,}),
//shareReplay(1),
);
private productCrudActionSubject = …Run Code Online (Sandbox Code Playgroud)