-2

Why yo use transpiler for converting ts file to js for that we can directly use js itself

Help me out

Sree sa
  • 19
  • 5
  • Then why are you using Angular not vanilla JS? – Harry Ninh Jul 13 '17 at 05:50
  • Is Angular2 only support typescipt? – Sree sa Jul 13 '17 at 05:53
  • Check this question [What is TypeScript and why would I use it in place of JavaScript?](https://stackoverflow.com/questions/12694530/what-is-typescript-and-why-would-i-use-it-in-place-of-javascript) . and this [Angular: Why TypeScript?](https://vsavkin.com/writing-angular-2-in-typescript-1fa77c78d8e8). You'll get your answers. – Maulik Modi Jul 13 '17 at 06:20
  • 3
    Possible duplicate of [What is TypeScript and why would I use it in place of JavaScript?](https://stackoverflow.com/questions/12694530/what-is-typescript-and-why-would-i-use-it-in-place-of-javascript) – Maulik Modi Jul 13 '17 at 06:23

1 Answers1

1

When you are developing a web app sometimes it becomes very important to decide the type of the variables to avoid errors. JavaScript does dynamic typing of the variables. In typescript you have the choice to give types of the variables statically or dynamically. Typescript has much more advanced and user-friendly Object Oriented Programming than JavaScript. It saves huge lines of codes and makes the code more readable and maintainable.