I understand that if I set ngZone to 'noop' in the main.ts file, I'll have to manually detect changes in the component. How do I manually detect changes in this case? I want to update my formDataIncome value to change the data in a graph (which works fine). It's just the interpolation that isn't working.
Thanks in advance!
My component:
import { Component, OnInit, ChangeDetectionStrategy, ElementRef, ChangeDetectorRef } from '@angular/core';
@Component({
selector: 'app-calculator',
templateUrl: './calculator.component.html',
styleUrls: ['./calculator.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class CalculatorComponent implements OnInit {
formDataIncome: number;
constructor(private el: ElementRef, private cd: ChangeDetectorRef) {
this.formDataIncome = 100000;
}
ngOnInit() {
console.log(this.formDataIncome)
}
}