I went over some Angular 2 tutorials and they are all using TypeScript to generate their Angular code. But people around me are using plain JavaScript to code Angular 1. So why do we need another language to generate Angular code for us, and is TypeScript the only language that Angular 2 currently supports?
-
If you go to the angular 2 site and look in the lower left corner you will see a select list for the language documentation which includes plain old JS, Dart, and TS. angular.io/docs/js/latest/index.htmlsilentsod– silentsod2016-10-21 19:15:58 +00:00Commented Oct 21, 2016 at 19:15
1 Answer
You really shouldn't learn Angular 1 and 2 at the same time.
If you want or need to take care of existing projects in Angular 1, try to get a grip on its principles first and postpone learning Angular 2.
If, however, you'll be moving to Angular 2 in the foreseeable future, go ahead and skip Angular 1 alltogether. Angular 2 is a complete redevelopment and ditches a lot of concepts that are still in use in Angular 1.
Concerning the language, you can develop Angular 2 in plain JavaScript, Dart, or in TypeScript. This (closed) question goes into some detail on the Pros and Cons of each of these languages.