-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
ExpresionChangedAfterItHasBeenCheckedError #18
Comments
More info... It seems to only happen when I hit the next button and reach the last item in the carousel. Then... I can continue to scroll to the right indefinitely without it looping around or showing additional items, which may be a side affect. |
Hey @jph2658 |
Hi, I get the same error. Any fix for this problem? As soon as i reach the end of the list i get the above error and when clicking the items in the carousel is only scrolling to the left instead of doing their own click actions. please advice. |
Ng2Carouselamos.html:44 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'. |
Any update of this ? I also need this fix. |
It seems this happens because a ViewChild is being accessed from ngAfterViewInit() with default change detection. The error went away when I switched to OnPush strategy for the component. |
Any one solved this issue ? |
This issue can be solved simply by injecting into the constructor private cdRef: ChangeDetectorRef |
Thanks a lot, I did it and it worked. |
Has anyone else seen this?
Happy to provide more information if needed.
ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'.
at viewDebugError (core.es5.js:8426)
at expressionChangedAfterItHasBeenCheckedError (core.es5.js:8404)
at checkBindingNoChanges (core.es5.js:8568)
at checkNoChangesNodeInline (core.es5.js:12440)
at checkNoChangesNode (core.es5.js:12414)
at debugCheckNoChangesNode (core.es5.js:13191)
at debugCheckRenderNodeFn (core.es5.js:13131)
at Object.eval [as updateRenderer] (Ng2Carouselamos.html:44)
at Object.debugUpdateRenderer [as updateRenderer] (core.es5.js:13113)
at checkNoChangesView (core.es5.js:12236)
The text was updated successfully, but these errors were encountered: