Generate Page into ts file

We know that ionic 2 has a feature to generate page into our application using command “ionic generate page x”.

The problem is page that was generated is javascript file. How do I generate page that is typescript file ? Thanks.

Unfortunately this is not supported at the moment:

Are you sure? ionic generate page ‘name’ --ts worked quite fine for me.

I don’t know, then it might be fixed in the meantime - the last time I’ve tried it I got JS files instead of TS files. Strange that there’re also no updates in the issue though. @DarthRevan Which version of the Ionic-CLI are you using?

So far as I know, it was integrated in latest beta. Here the CLI I’m using:

Ionic Framework Version: 2.0.0-beta.4
Ionic CLI Version: 2.0.0-beta.24

Mine is not updated yet to the latest version. So, I’ll try it later. Thank you guys :smiley:

Thanks for the info, I just updated to the latest beta and I can confirm that it’s generating TS-files in a TS-project (even without adding --ts explicitly).

I’m sorry, but what command do I use to update my ionic version ?

Here is a good explanation (you can check out the linked post for more details):

1 Like