Problem with .ts files

In my ionic project I only have one page created in src / pages and there I have the .ts file.
But I have created the whole project in the www folder, and there I can not find the .ts files.
I researched a little on the net and all I find is that the pages are being created in src / pages and there are the .ts files of each.
My problem is that I wanted to add a plugin, and for that I need the .ts file on the page.

Any suggestion?


Don’t do that. That folder doesn’t belong to you, it’s managed by the build process. Everything you write goes in src.

Yes, everything needs to be written in the /src folder not the /www folder (which is essentially a compiled output folder that gets rewritten every time you build the project (it will wipe out whatever you put in /www but what plugin are you trying to add?

Plugins are added at the prompt in the project folder such as:

myapp jbmartin$ ionic cordova plugin add cordova-sqlite-storage --save (on Mac)
C:\Users\jbmartin\myapp\> ionic cordova plugin add cordova-sqlite-storage --save (on Windows)

Ok, and is there any “easy” way to turn those pages to src / pages? If not, just copy the files I already have to that folder, and then create the .ts file?
I built everything here, because when exporting from the ionic creator the pages come created in that folder.
Sorry, but I’m a beginner to this.

:thinking: Are you using Ionic 1 or 2+ in Ionic Creator? (I can’t recall if Creator supports 2+ yet or not)

I’m guessing that exporting isn’t the same as building the app in Creator?

I think it’s version 3. So I’m having a big problem, because I have the whole project done in the www folder, and I needed a plugin. Otherwise everything worked fine, but I never needed to use plugins.
Thank you

What language is the rest of the code? JavaScript?

Yes, the rest of code is AngularJS

It already worked what I wanted to do. thank you all