The Official Ionic Blog

Build amazing native and progressive web apps with HTML5

In our last screencast, we converted all of our Angular controllers to ES6-styled classes. Now, let’s take a look at that factory and how we can make it a class, and get code completion for all of its methods.

Additional Notes

Follow up videos

Ionic and TypeScript Part 1

Ionic and TypeScript Part 2

Ionic and TypeScript Part 3

  • Frantisek Kolar

    Pretty cool. I am thinking converting my existing ionic project to typescripts as it will be more intuitive for me to navigate thru while reading classes and interfaces, real data types. etcs.

    Is it safe at this point? would not be there any hidden issues ? Or there is not much magic so far as we do work with GULP commands that converts everything into regular javascripts, here all works..

    Will migrate to 1.2 first..

    Frank

    • Arondite

      Adding typescript to an existing project is actually quite safe. You don’t have to modify any code up front as the compiler will interpret non-typescript files perfectly fine. This will allow you to setup your compile script (gulp works well) and slowly convert existing code as you have the time.

      I just went through an ionic typscript conversion a few months back and it was fairly painless.

      • Frantisek Kolar

        Sounds good.

  • Kumar Gandhi K

    Hey Mike,
    Thank you for the video. Things are starting to get really cool.
    Besides what editor are you using?.

    • Paul Lou

      It should be Visual Studio Code.

  • Bernardo Gomes

    Hey MR Mike, Your videos are amazing.
    I need more Videos !!

    THX !!