File

feature-libs/checkout/components/order-confirmation/components/order-confirmation-overview/order-confirmation-overview.component.ts

Implements

OnInit OnDestroy

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector cx-order-confirmation-overview
templateUrl ./order-confirmation-overview.component.html

Index

Properties
Methods

Constructor

constructor(checkoutService: CheckoutFacade)
Parameters :
Name Type Optional
checkoutService CheckoutFacade No

Methods

ngOnDestroy
ngOnDestroy()
Returns : void
ngOnInit
ngOnInit()
Returns : void

Properties

order$
Type : Observable<any>
import {
  ChangeDetectionStrategy,
  Component,
  OnDestroy,
  OnInit,
} from '@angular/core';
import { CheckoutFacade } from '@spartacus/checkout/root';
import { Observable } from 'rxjs';

@Component({
  selector: 'cx-order-confirmation-overview',
  templateUrl: './order-confirmation-overview.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class OrderConfirmationOverviewComponent implements OnInit, OnDestroy {
  order$: Observable<any>;

  constructor(protected checkoutService: CheckoutFacade) {}

  ngOnInit() {
    this.order$ = this.checkoutService.getOrderDetails();
  }

  ngOnDestroy() {
    this.checkoutService.clearCheckoutData();
  }
}
<ng-container *ngIf="order$ | async as order">
  <cx-order-overview [order]="order"></cx-order-overview>
</ng-container>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""