Did you know that in angular version 19+ you can use
#name
instead of
private name
to make them true private?
I didn't know that properties with private field works only before compile time and it is open in production code for access.
Here is a good article about this https://riegler.fr/blog/2024-05-17-private-fields-downleveling
Make sure you are not using in earlier angular versions as it will result in weakMap creation.
#angular #ts #typescript #advanced #tips
#name
instead of
private name
to make them true private?
I didn't know that properties with private field works only before compile time and it is open in production code for access.
Here is a good article about this https://riegler.fr/blog/2024-05-17-private-fields-downleveling
Make sure you are not using in earlier angular versions as it will result in weakMap creation.
#angular #ts #typescript #advanced #tips
riegler.fr
Understand private properties downleveling in Angular
And more on browserslist and Esbuild integration into Angular