Do I have to learn es6 or typescript in order to use ionic 2?


Do I have to learn es6 or typescript in order to use ionic 2? I’m still new to learning es6 and I’m noticing the docs are all in es6. Do I have to learn that before I’m able to switch to ionic 2?


I think it’s reasonable to learn ES6 (or TypeScript) at the same time as learning Ionic 2. Unlike something like Ionic / Angular 1 there’s not really any framework specific syntax in Ionic 2, so by learning Ionic 2 you’ll be learning plain ES6 anyway.


Regarding ES6 (ES2015), yes, you need to know javascript :wink:. Remember, ES2015 is just the latest version of javascript, you’ll need to learn it anyway, and keep in mind you don’t have to start using every feature of it right away. Start by using the new class syntax (basically required for Angular2/Ionic2) and start using more from there. Learn by doing!

As far as TypeScript goes, you do not strictly need to learn it. However, Angular 2 is written in it and Ionic 2 is written in it. Also, documentation for both Angular 2 and Ionic 2 in vanilla javascript is somewhere between extremely sparse and non-existent. The approach I’ve taken is to make use of TypeScript for dependency injection for the nicer syntax but otherwise I just write JavaScript. Remember that you can use TypeScript as much or as little as you want, kind of like ES2015.


I recommend you, for be a good ionic/javascript developer, learn:

  1. Javascript.
  2. Typescript. Build in top of JavaScript.
  3. Angular 2. Build in top Typescript.
    And then:
  4. Ionic 2. Build in top Angular 2.