Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

NG0100: Expression has changed after it was checked #45

Closed
zakarea-Tfaili opened this issue May 26, 2021 · 1 comment
Closed

NG0100: Expression has changed after it was checked #45

zakarea-Tfaili opened this issue May 26, 2021 · 1 comment

Comments

@zakarea-Tfaili
Copy link

I am using ng-select2 inside a helper controller

export class DropdownInputComponent implements ControlValueAccessor, OnInit {
@input() data: Array;
.
.
.
constructor(@self() public ngControl: NgControl, private elementRef: ElementRef) {
this.ngControl.valueAccessor = this;
}
.
.
.

}

when adding [formControl]="ngControl.control" to the ng-select2 component and the data is returned by
this.structureService.getAvailableStructures().subscribe(response => {
this.structures = response;
});

An error ExpressionChangedAfterItHasBeenCheckedError is thrown

@icecoldfire
Copy link

Angular issue: https://angular.io/errors/NG0100

Please first fix this issue, then create a reproducible demo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants