代码:
JerryOrderEntry$: Observable<OrderEntry[]> = this.cartService.getEntries();
constructor(private currentProductService: CurrentProductService, private cartService: ActiveCartService
) {
}
html代码:
<h1>{{ productName$ | async }} </h1>
<h1>{{ JerryOrderEntry$ | async | json }} </h1>
最后效果:
一个产品: