小编Shr*_*mar的帖子

Crud Service RXJS Angular 9 Command Query Pattern

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)

crud cqrs rxjs angular

7
推荐指数
1
解决办法
765
查看次数

标签 统计

angular ×1

cqrs ×1

crud ×1

rxjs ×1