projects/congarevenuecloud/elements/src/lib/price/price.component.ts
The component is work in progress.
Wrapper component for displaying the price of a record. Supports cart, product, cart item, product options and orders. This component is a work in progress. Change detection on this component has been tuned, so use this component in favor of using the price pipes directly.
import { PriceModule } from '@congarevenuecloud/elements';
@NgModule({
imports: [PriceModule, ...]
})
export class AppModule {}
// Basic Usage
```typescript
<apt-price [record]="product"></apt-price>
// All inputs and outputs.
```typescript
<apt-price
[record]="product"
[quantity]="1"
[formatted]="false"
[type]="total"
[term]="term"
[bundle]="true"
></apt-price>
OnChanges
OnDestroy
changeDetection | ChangeDetectionStrategy.OnPush |
selector | apt-price |
styles |
:host{
display: block;
}
|
template |
|
Inputs |
constructor(priceService: PriceService, localCurrencyPipe: LocalCurrencyPipe)
|
|||||||||
Parameters :
|
bundle |
Type : boolean
|
Default value : false
|
Flag to set this product type as a bundle |
formatted |
Type : boolean
|
Default value : true
|
Optional boolean argument to display the price as a formatted currency or as a raw number (defaults to true) |
quantity |
Type : number
|
Default value : 1
|
The quantity of the record (defaults to 1) |
term |
Type : number
|
Term used to calculate price of bundle product. |
:host{
display: block;
}