Answer by Estus Flask for Should I write methods as arrow functions in...
The points made in this React answer are still valid in Angular, any other framework or vanilla JavaScript/TypeScript.Class prototype methods are ES6, class arrow methods aren't. Arrow methods belong...
View ArticleAnswer by Andrei Matracaru for Should I write methods as arrow functions in...
There's just one case where you have to refrain from using arrow functions if you need to do AOT compilation, as documented hereWhen configuring a module, you can't use arrow functions.❌ DONT:import {...
View ArticleAnswer by Milad for Should I write methods as arrow functions in Angular's class
A good use case of class arrow functions are when you want to pass a function to another component and save the context of current component in the function.@Component({ template:` I'm the...
View ArticleShould I write methods as arrow functions in Angular's class
In Angular it's technically possible to write class methods as ES2015 arrow functions, but I have never actually seen someone do it. Take this simple component for instance:@Component({ selector:...
View Article
More Pages to Explore .....