davidesp davidesp - 1 year ago 90
TypeScript Question

Where to put JavaScript files on an Ionic 2 app?

What's the best location to place the auxiliary

files on an
Ionic 2
application? I won't really want to put the source code inside the
directory since it is generated automatically.

Below you have a sample of the directory structure of a
Hello World
Ionic 2

enter image description here

Answer Source

If you go one more step inside pages folder you can see all of your app pages


  1. All of your page's view code goes into .html file
  2. CSS code goes into .scss file
  3. in ionic 2 we dont directly use javascript. we use type script. and ionic takes care of compiling that code by converting it into javascript.

So our typescript code goes into .ts fil

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download