I am currently learning typescript with angular 2. In the tutorial mostly angular 2 services, factories, controllers are implemented using typescript, which are complex to implement. I feel its easier to implement services and controllers without only using Angular and not typescript. So is it important to learn to implement using typescript or I am better off implementing them in angular itself? I am asking if the angular can be used in javascript and explicitly not in typescript. I am asking if is it okay to not use typescript(i.e modules, namespaces etc) while declaring angular function in a typescript project.
Asked
Active
Viewed 32 times
-3
-
you can use plain javascript, too as mentioned here: https://stackoverflow.com/questions/35229611/using-angular-2-without-typescript-compiler#answer-35229646 – Matthias Gwiozda Jun 04 '17 at 08:18
-
What do you mean *"implementing them in angular itself"*? You can use TS, Dart or JS to write apps using the Angular framework, but most of the examples are in TS and it's not that hard to learn if you are already familiar with JS. Also I'm not sure the JS version is simpler, see e.g. https://stackoverflow.com/questions/35676164/create-an-angular-2-service-in-es5 – jonrsharpe Jun 04 '17 at 08:22
1 Answers
0
You can use plain JavaScript as well if you are comfortable with that. But its better to use typescript as all new versions of angular are mainly written in Typescript. Angular 2 documentation is available in both JavaScript as well as typescript. Happy coding!

Sawan Patodia
- 773
- 5
- 13