-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
Support for as
in ngFor
#52184
Comments
This seems like a simple bug - the migration is missing the @for (user of users | slice: 0 : 2; as slicedUsers; track pony) { |
I tried but it did not compile I think, is it supposed to be supported by the control flow syntax? I don't think there is a test about this in the fwk. |
Yeh, I don't think we've added support for aliasing input collections |
I mistook the original issue as being related to |
as
in ngFor
Track pony? |
@spock123 It's an example from my book, I forgot to change one of the variables when writing the issue 😆. Fixed 👍 |
This has been fixed by b2aeaf5 as it now warns the developers of such cases |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
Angular supports the following syntax in
*ngFor
:Currently the control flow schematics generates:
which is not valid with the control flow syntax
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
I'm not sure how this should be migrated as I think the control flow syntax does not allow to alias the resulting collection
The text was updated successfully, but these errors were encountered: