- A couple of weeks ago we wrote about how to write Angular code in ES5 and took a closer look at what annotations and decorators translate to.
- In order to understand the syntactical improvements in ES5 when building Angular applications, we have to understand what the code looked like before.
- Angular uses decorators to add meta data to it’s application code, which in TypeScript (or ES7) looks something like this:
ES5 doesn’t have the concept of annotations or decorators.
- That’s why the code above translates to something like this, if we’d write it in ES5:
If this is entirely new to you, you might want to read our article on Angular code in ES5 which gives a more detailed explanation of this code.
- The ES5 syntax for Angular 2.
Who do you think would benefit most from this? Even better ES5 code for Angular 2 > https://t.co/1bqpBHgaG3
— AngularJS News (@AngularJS_News) July 30, 2017
Tweets by PascalPrecht
Tweets by timche_
Tweets by tim_hartmann_