import { ChangeDetectionStrategy, Component, effect, model, } from '@angular/core'; import { FormsModule } from '@angular/forms'; @Component({ standalone: true, imports: [FormsModule], selector: 'app-root', template: `

MacBook

1999,99 €

Extras:

+500 GB drive-space
+4 GB RAM
Better GPU
`, changeDetection: ChangeDetectionStrategy.OnPush, }) export class AppComponent { drive = model(false); ram = model(false); gpu = model(false); constructor() { /* Explain for your junior team mate why this bug occurs ... */ effect(() => { if (this.drive() || this.ram() || this.gpu()) { alert('Price increased!'); } }); } }