DEV Community

Nhan Nguyen
Nhan Nguyen

Posted on

Angular - Local variables and the new block syntax

Image description

In this example, we store the data we get from a subscription in the user variable:

Image description

You might want to use the new control flow syntax of Angular 17. It is possible to use local variables as well using the following syntax:

Image description

The only difference is the ; in the middle of the expression.


I hope you found it useful. Thanks for reading. 🙏
Let's get connected! You can find me on:

Top comments (0)