I have just had a look at the Angular quickstart document and it shows the usage of TypeScript. A thought has just popped into my mind:
Does Angular require TypeScript?
Then a few seconds later:
How does Angular relate to TypeScript?
A quick Google of the first question does not lead to a direct answer. As I can’t be the first or the last person to ask this question, I am posting it to Stackoverflow.
I have just had a look at the Angular quickstart document and it shows the usage of TypeScript. A thought has just popped into my mind:
Does Angular require TypeScript?
Then a few seconds later:
How does Angular relate to TypeScript?
A quick Google of the first question does not lead to a direct answer. As I can’t be the first or the last person to ask this question, I am posting it to Stackoverflow.
Share Improve this question edited Aug 4, 2015 at 13:26 Tom Fenech 74.7k13 gold badges117 silver badges151 bronze badges asked Aug 4, 2015 at 11:14 Ian RingroseIan Ringrose 51.9k57 gold badges218 silver badges322 bronze badges 01 Answer
Reset to default 17Does Angular require Typescript
No it doesn't. You can use normal Javascript also. The designers wanted to give as many choices as possible so the framework is easily accessible by many people. The Typescript piler generates ES6/ES5 pliant code you can consume.
The Angular2 "Getting Started" shows all examples in both TypeScript and ES5.
How does Angular relate to Typescript
All the source code will be written in Typescript.
However, they also need to support transpiling to Dart (using ts2dart), so some parts of the code base are written just so transpiling to Dart is possible. For example, Dart has a notion of constant expressions, so they have to use CONST_EXPR
in the TS code (which makes the code base more plicated). This is only an implementation detail and user code does not have to worry about this.