Do I need to learn TypeScript first before looking for Angular2?

Do I need to learn TypeScript first before trying to learn AngularJS 2?

+7
javascript angularjs typescript
source share
2 answers

No need to learn TypeScript, but I definitely recommend you learn this. TypeScript is great. Not only that, but TypeScript is actually great and very solid

Check answer

+3
source share

The official position of the AngularJS team is that it will be completely optional. You can write your entire application in JavaScript that we know today (ECMAscript5). But to be honest, there are some serious problems with this version.

  • no real classes and inheritance (prototype only)
  • type check
  • no modular system (loading javascript parts)

If you still want to write it to ECMAscript, you will need to write another code to do the same, and ergo has a higher chance of getting errors in your code.

You can write it in ECMAscript 6, which is the next version. Unfortunately, in most browsers it is not yet supported. But you can already use it and then compile your code in ECMAscript 5 during fase deployment (you can configure GRUNT for this)

Finally, you can use Typescript. It offers all ECMAscript offers and more. Learning this should not mean learning a new language, as JavaScript is also valid in Typescript. They simply added syntactic sugar to make it more powerful and healthy. You will still have to compile it in ECMAscript 5 during deployment.

0
source share

All Articles