Repository navigation
Closed
Labels
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfularea: compilerIssues related to `ngc`, Angular's template compilerbugcore: control flowIssues related to the built-in control flow (@if, @for, @switch)state: has PR
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
Yes
Description
- after changing from
*ngForto@forcontrol flow I get error: ExpressionChangedAfterItHasBeenCheckedError
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
instrument.js:123 Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI: 17.0.0
Node: 18.18.2
Package Manager: npm 10.0.0
OS: win32 x64
Angular: 17.0.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, localize, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1700.0
@angular-devkit/build-angular 17.0.0
@angular-devkit/core 17.0.0
@angular-devkit/schematics 17.0.0
@angular/cli 17.0.0
@schematics/angular 17.0.0
rxjs 7.8.1
typescript 5.2.2
zone.js 0.14.2
Anything else?
reproduction https://stackblitz.com/edit/stackblitz-starters-jx5weg?file=demo%2Fsrc%2Fapp%2Fapp.component.ts
- in terminal cd demo
- in terminal pnpm install
- in terminal pnpm run start
- in browser open dev console and see the error
Reacted by hillin and kle-pra
Metadata
Metadata
Assignees
Labels
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfularea: compilerIssues related to `ngc`, Angular's template compilerbugcore: control flowIssues related to the built-in control flow (@if, @for, @switch)state: has PR
Activity
JeanMeche commentedon Nov 14, 2023
Hummm, this looks like a compiler issue with a missing
ɵɵadvance(), if any expert can confirm.If you add whatever interpolation before the for loop, the error vanishes (An
ɵɵadvance()is correctly added to the compiled template).sysmat commentedon Nov 15, 2023
@JeanMeche this is then a bug in
@forbut yes it is strange when empty interpolation is added error is goneatscott commentedon Nov 15, 2023
Simplified reproduction: https://stackblitz.com/edit/stackblitz-starters-uenxzz
fix(compiler): changed after checked error in for loops (#52935)
angular-automatic-lock-bot commentedon Dec 16, 2023
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(compiler): changed after checked error in for loops (angular#52935)
fix(compiler): changed after checked error in for loops (angular#52935)
fix(compiler): changed after checked error in for loops (angular#52935)
fix(compiler): changed after checked error in for loops (angular#52935)