Problem files js/ts


#1

Hello! I’m starting with Ionic 2 and I have a problem, when I create a new proyect ionic 2 (ionic start name_proyect blank --v2) in the folder app/pages/home I have 3 files: “home.html” , “home.scss” , “home.ts” I don’t know why I don’t have the file home.js and I have home.ts. Please, somebody know what happend?
Thanks in advance.

Best regards.


#2

Ionic2 have changed to use .ts from Beta.9 onwards. I don’t know if you can get it to use .js with a --js argument on ionic start.

TS is TypeScript, and is by far a better Javascript variant, as it gives you quite a bit of control and type safety checks.


#3

Same problem as @Jose_Ionic !
On my actual projet I’m using JS and I can’t redo everything with TS now !
So is there a way to use beta 9 with JS ?
I tryed using ionic start --v2 --js but I still get .ts files :frowning:


#4

Ionic 2 now focused its efforts on TypeScript only, learn to use it, it’s easy :wink:


#5

Hey yall, just chiming in here.

Yes, we’re going all in on typescript with ionic 2.
While it may feel different, it’s important to remember, “it’s just ES6”

All of the static typings that TS offers are optional, you dont have to use them, and you probably won’t have to for an app.
For us, it was a no brainer when we saw the features that typescript offers users, especially in terms of auto completion and code hints!

We think that you’ll love TS.


#6

So far TS is the best shoehorn I’ve seen so far when it comes to injecting some sanity into JS.


#7

Ok thinks for your reply !
Where I can find a good intro to TS ? :slight_smile:


#8

https://www.typescriptlang.org/docs/handbook/basic-types.html

Have fun! :wink:


#9

Thanks !

I have started to convert my app, but I have problems !
If you have time, I create a new topic : Help to convert ionic 2 JS project to TS one

Thanks again