Skip to content
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

[Angular 17] Change to use new control flow syntax #24316

Merged
merged 14 commits into from
Nov 23, 2023
Merged

[Angular 17] Change to use new control flow syntax #24316

merged 14 commits into from
Nov 23, 2023

Conversation

mraible
Copy link
Contributor

@mraible mraible commented Nov 21, 2023


Please make sure the below checklist is followed for Pull Requests.

@mraible mraible marked this pull request as ready for review November 21, 2023 21:41
@qmonmert
Copy link
Contributor

control flow is in developer preview, it's too early no?
https://angular.io/guide/control_flow
image

@mraible
Copy link
Contributor Author

mraible commented Nov 21, 2023

@qmonmert I was not aware it's only in developer preview. Thanks for the heads up!

@mshima
Copy link
Member

mshima commented Nov 21, 2023

Me neither.
According to https://blog.angular.io/introducing-angular-v17-4d7033312e4b, control flow will be on developer preview until v18.

There are still some differences between how the built-in control flow handles content projection compared to *ngIf, *ngFor, and *ngSwitch, and we’ll be working on them over the next months. Aside from that, we’re confident in the implementation and stability of the built-in control flow so you can give it a try today! We’d like to keep it under developer preview until the next major release so that we can open the door for potential backward incompatible fixes in case we find opportunities to further enhance developer experience.

v18 is 6 months away.
Since @mraible already started working on it and we’re confident in the implementation and stability of the built-in control flow so you can give it a try today!, if the team decides to use it I am ok with it.

@mraible
Copy link
Contributor Author

mraible commented Nov 21, 2023

This expression in password.component.html.ejs doesn't work:

@if (account$ | async as account) {

Error:

Property 'account' does not exist on type 'PasswordComponent'. Did you mean 'account$'?

5         <h2 jhiTranslate="password.title" [translateValues]="{ username: account.login }">

@mshima mshima closed this Nov 22, 2023
@mshima mshima reopened this Nov 22, 2023
@mshima
Copy link
Member

mshima commented Nov 22, 2023

ng-bootstrap is already using new control flow.

@mshima mshima merged commit 7d7b8cc into main Nov 23, 2023
40 checks passed
@mshima mshima deleted the control-flow branch November 23, 2023 21:10
@mshima mshima mentioned this pull request Nov 24, 2023
5 tasks
@deepu105 deepu105 added this to the 8.1.0 milestone Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants