question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Placeholder - ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.

See original GitHub issue

In this beta.6, I have the following bug:

It does not work:

<ng-select [(ngModel)]="id" [options]="items" [placeholder]="'shared.input.select' | translate" [notFoundMsg]="'shared.input.selectNotFound' | translate" [multiple]="true"></ng-select>

Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. in SelectComponent.ngfactory.js:135:27

If I remove the placeholder, it starts working.

<ng-select [(ngModel)]="id" [options]="items" [notFoundMsg]="'shared.input.selectNotFound' | translate" [multiple]="true"></ng-select>

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
PMJMendescommented, Jul 21, 2017

This bug existed before, was fixed in beta 5 and was reintroduced in beta 6. The problem is the call to updateState in ngAfterViewInit. See my comment to issue 143.

3reactions
aniruddhadas9commented, Aug 11, 2017

I am facing the same issue in beta.6

SelectComponent.html:53 ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: '1'. Current value: '101'.
    at viewDebugError (core.es5.js:8420)
    at expressionChangedAfterItHasBeenCheckedError (core.es5.js:8398)
    at checkBindingNoChanges (core.es5.js:8562)
    at checkNoChangesNodeInline (core.es5.js:12423)
    at checkNoChangesNode (core.es5.js:12397)
    at debugCheckNoChangesNode (core.es5.js:13174)
    at debugCheckDirectivesFn (core.es5.js:13076)
    at Object.View_SelectComponent_13._co [as updateDirectives] (SelectComponent.html:59)
    at Object.debugUpdateDirectives [as updateDirectives] (core.es5.js:13058)
    at checkNoChangesView (core.es5.js:12217)
View_SelectComponent_13 @ SelectComponent.html:53
webpackJsonp.../../../core/@angular/core.es5.js.DebugContext_.logError @ core.es5.js:13398
webpackJsonp.../../../core/@angular/core.es5.js.ErrorHandler.handleError @ core.es5.js:1080
(anonymous) @ core.es5.js:4814
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.bundle.js:10782
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ polyfills.bundle.js:10532
webpackJsonp.../../../core/@angular/core.es5.js.NgZone.runOutsideAngular @ core.es5.js:3844
webpackJsonp.../../../core/@angular/core.es5.js.ApplicationRef_.tick @ core.es5.js:4814
(anonymous) @ core.es5.js:4684
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.bundle.js:10782
onInvoke @ core.es5.js:3890
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke @ polyfills.bundle.js:10781
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.run @ polyfills.bundle.js:10532
webpackJsonp.../../../core/@angular/core.es5.js.NgZone.run @ core.es5.js:3821
next @ core.es5.js:4684
schedulerFn @ core.es5.js:3635
webpackJsonp.../../../../rxjs/Subscriber.js.SafeSubscriber.__tryOrUnsub @ Subscriber.js:238
webpackJsonp.../../../../rxjs/Subscriber.js.SafeSubscriber.next @ Subscriber.js:185
webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber._next @ Subscriber.js:125
webpackJsonp.../../../../rxjs/Subscriber.js.Subscriber.next @ Subscriber.js:89
webpackJsonp.../../../../rxjs/Subject.js.Subject.next @ Subject.js:55
webpackJsonp.../../../core/@angular/core.es5.js.EventEmitter.emit @ core.es5.js:3621
checkStable @ core.es5.js:3855
onLeave @ core.es5.js:3934
onInvokeTask @ core.es5.js:3884
webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask @ polyfills.bundle.js:10814
webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask @ polyfills.bundle.js:10582
ZoneTask.invoke @ polyfills.bundle.js:10877
SelectComponent.html:53 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 2, nodeDef: {…}, elDef: {…}, elView: {…}}
Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
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 >
Expression has changed after it was checked. Previous value ...
I have angular reactive form in parent component and sections inside childrens component. Inside the child component I have a checkbox – when...
Read more >
autoFocusedElement + Floating Label = Error - Telerik
ExpressionChangedAfterItHasBeenCheckedError : Expression has changed after it was checked. Previous value: 'k-state-focused: false'.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found