File
Metadata
| changeDetection |
ChangeDetectionStrategy.OnPush |
| selector |
cx-checkout-order-summary |
| templateUrl |
./checkout-order-summary.component.html |
|
cart$
|
Type : Observable<Cart>
|
|
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { ActiveCartService, Cart } from '@spartacus/core';
import { Observable } from 'rxjs';
@Component({
selector: 'cx-checkout-order-summary',
templateUrl: './checkout-order-summary.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CheckoutOrderSummaryComponent {
cart$: Observable<Cart>;
constructor(protected activeCartService: ActiveCartService) {
this.cart$ = this.activeCartService.getActive();
}
}
<cx-order-summary [cart]="cart$ | async"></cx-order-summary>
Legend
Html element with directive