Ionic2 - Is there a way to create projects with js files?


#1

When Im creating apps, the default ends of the files are .ts, i know it depends of the ionic version,but is there an option to switch it with js? There is the oposite:

"$ ionic start app_name --v2 --ts " , but "$ ionic start app_name --v2 --js " doesnt working…


#2

Hello,

Have you tried with just ionic start app_name --v2 ?

It works for me.


#3

Yes, i did :frowning: That’s my version. I read a lot about this, i saw it
depends of the version. Thats mine


#5

Ionic has dropped support for using ES6 projects.
That being said, ES6 code is typescript.

So this ES6 class

export class MyClass{
  constructor(){}
}

Is the same in TS

export class MyClass{
  constructor(){}
}

#6

i just wanted to know is there an option like this, thanks :slight_smile:


#7

Working in JS with angular2/ionic2 is making your life harder for you. Most of the examples/docs/tuts are written in TypeScript.

And after overcoming the first TypeScript pains you’ll realize that TypeScript is better than JS :slight_smile:


#8

hah i hope so :smile: We will see…