File
Metadata
| changeDetection |
ChangeDetectionStrategy.OnPush |
| selector |
cx-promotions |
| templateUrl |
./promotions.component.html |
|
promotions
|
Type : Promotion[]
|
|
|
|
promotions
|
Type : Promotion[]
|
Decorators :
@Input()
|
|
|
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Promotion } from '@spartacus/core';
@Component({
selector: 'cx-promotions',
templateUrl: './promotions.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class PromotionsComponent {
@Input()
promotions: Promotion[];
constructor() {}
}
<div class="cx-promotions" *ngIf="promotions">
<ul *ngFor="let promotion of promotions">
<li>{{ promotion.description }}</li>
</ul>
</div>
Legend
Html element with directive