Which is the recommended way to develop angular 2.0 application. is it with javascript or typescript. i found difficult to start the angular 2.0 with typescript which is entirely different from the javascript.
2 Answers
In fact, TypeScript is a superset of ES6. In short, you will have the following in addition:
- Type checking (class properties, method parameters)
- Decorators
- Interfaces
Perhaps the gap between ES5 and ES6 / TypeScript is important but there are really advantages to use it:
- The compilation phase allows you to detect potential problems in your case
- TypeScript provides contracts (.d.ts files) of the elements / third-party libraries you use
- Support of IDE for completion
That said, you are free to use either ES5, ES6 or TypeScript. It's up to you ;-)
TypeScript
andJavaScript
. after doing a little bit search on google, I have found a great video to understand.TypeScript
and this is really easy to understand. I have never useTypeScript
before. Infact some tutorials are not available inJavascript
orDART
for now.