Alex2016-05-04 21:13:45
Alex, 2016-05-04 21:13:45

Angular2: JavaScript or TypeScript?

I want to master Angular2... Should I switch
to TypeScript or can I write in good old JS?
How would be more correct?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
sanex3339, 2016-05-04

TypeScript, there's nothing to even think about.

Dark Hole, 2016-05-04

The question was asked incorrectly.
Everyone writes in whatever suits them and you don't have to listen to those who say "JavaScript only" and "TypeScript only"
My opinion - write in JS if you know it well. JS is JS and TS is JS with, say, C++ (of course IMHO). What's the point of adding incomprehensible (especially if you haven't learned more OOP languages) supplements when you can write without them?
However, if you want to learn TS, I won't dissuade you :)

Serge Shkurko, 2016-10-26

Of course, as convenient for you, but my advice is Type Script.
- Strong typing (Less chance of error as a result)
- When using a good editor / IDE - useful hints
- Angular advises to use TS, that's why many examples, tutorial videos are also provided on TS

No Name, 2017-01-23

It was very uncomfortable to switch from Angular 1 + JS to Angular 2 + Typescript.
But over time, I got used to and appreciated all the advantages of web components and a full-fledged OO language.
Instead of a thousand checks, you can write an interface and any data mismatch will be prompted by the IDE or compiler.
So typescript.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question