-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: NG0100: ExpressionChangedAfterItHasBeenCheckedError #20
Comments
Same error here while creating slides directly from HTML and not from a for loop. Complete trace below
|
I too had the issue and couldnt resolve this. Any updates on this? |
Any updates? Same error here - it's unfortunately preventing me from using this module at all. |
This may be a result of implementation. Without seeing all the code, it's difficult to know, but based on the error messaging, it appears you are setting the an array, for the ngFor, but not initially defining that array.
You should instead do this:
Or add a changeDetectorRef and set 'detectChanges' in your ngOnInit. This is another way to get angular to process the current value, before you change it to an array. The better practice would be to always initialize your properties though. Again, this is all based on assumptions, without seeing the actual implementation. These are solutions that typically resolve that 'expression changed' error. We use async pipes, which offer a better way of handling this |
I used the default example and when I removed *ngFor.
as :
I got an error :
my goal was to make a certain number of slides without using a loop.
Can I solve this error locally?
Thank for your help
The text was updated successfully, but these errors were encountered: