Skip to content

Control flow schematic: @for (document of <collection>; track document) results in template not compiling #53293

@hamfastgamgee

Description

@hamfastgamgee

Which @angular/* package(s) are the source of the bug?

compiler-cli, core

Is this a regression?

No

Description

We had a component processed by the migration that resulted in our iteration variable and our track variable both being named "document", but the template parser choked on this and said that all the HTML inside the @for did not have a "createElement" method. It seems clear that the parser got confused with the global "document" object.

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

No response

Please provide the environment you discovered this bug in (run ng version)

No response

Anything else?

No response

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: coreIssues related to the framework runtimearea: migrationsIssues related to `ng update`/`ng generate` migrationscompiler: template type-checkingcore: control flowIssues related to the built-in control flow (@if, @for, @switch)state: has PR

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions