I have done some reading and investigation on this error, but not sure what the correct answer is for my situation. I understand that in dev mode, change detection runs twic
Other way that i used to resolve this:
import { Component, ChangeDetectorRef } from '@angular/core'; @Component({ selector: 'your-seelctor', template: 'your-template', }) export class YourComponent{ constructor(public cdRef:ChangeDetectorRef) { } ngAfterViewInit() { this.cdRef.detectChanges(); } }