Expression X has changed after it was checked. Previous value...
See original GitHub issueHi. As in readme, I’ve installed angular2-moment. It works perfect. The problem I’m having is, that I’m using the pipe in @Component
:
<ion-card class="single-tweet">
<ion-item>
<ion-avatar item-left>
<img src="{{tweet.user.profile_image_url_https}}">
</ion-avatar>
<ion-note item-right class="time">
{{tweet.unixtime | amTimeAgo}}
</ion-note>
<div class="name">{{tweet.user.name}}</div>
<small class="screen-name">@{{tweet.user.screen_name}}</small>
</ion-item>
</ion-card>
I use this component on ListAll page. When clicking single ion-card, I’m jumping to details page, where I’m again using component above. If, in the meantime I update my tweet variable, I’ll then get this error:
browser_adapter.js:76 EXCEPTION: Expression '
{{tweet.unixtime | amTimeAgo}}
in SingleTweet@7:38' has changed after it was checked. Previous value: '39 minutes ago'. Current value: '40 minutes ago' in [
{{tweet.unixtime | amTimeAgo}}
in SingleTweet@7:38]
and then:
TypeError: Cannot read property 'removeEventListener' of undefined
at Content.ngOnDestroy (content.js:79)
at AbstractChangeDetector.ChangeDetector_DetailPage_0.dehydrateDirectives (viewFactory_DetailPage:81)
at AbstractChangeDetector.dehydrate (abstract_change_detector.js:141)
at AbstractChangeDetector.destroyRecursive (abstract_change_detector.js:158)
at AbstractChangeDetector.destroyRecursive (abstract_change_detector.js:165)
at AppView.destroy (view.js:111)
at AppViewManager_.destroyViewInContainer (view_manager.js:124)
at ViewContainerRef_.remove (view_container_ref.js:116)
at Array.<anonymous> (nav-controller.js:1108)
at ViewController.destroy (view-controller.js:420)
Should I in between somehow disable timeago when I do the update? Any help would be perfect 👍
Issue Analytics
- State:
- Created 8 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
NG0100: Expression has changed after it was checked - Angular
Angular throws an ExpressionChangedAfterItHasBeenCheckedError when an expression value has been changed after change detection has completed.
Read more >ExpressionChangedAfterItHasBe...
I was having trouble with . ERROR: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value ...
Read more >Angular Debugging "Expression has changed": Explanation ...
Learn a complete explanation about ExpressionChangedAfterItHasBeenCheckedError: why it occurs, how to troubleshoot it and how to fix it.
Read more >Fixing "Expression has changed after it was checked" in Angular
The exception appears (in the development mode) at the moment the value is checked and value is different of the updated value. Error...
Read more >Detect Changes in Data and Expression Values - MathWorks
Edge detection operators behave in a similar way, except that they compare the value of an expression at the beginning of the last...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lordgreg are you using
typings
in your project?try
typings install --save moment
@urish still happens, on 0.8.0