How to convert app structure for upload to Ionic View?

I started creating an Ionic app (about a year ago) and did not use the CLI tool to generate the structure for it.

I’m now refreshing the app and want to finish it up. However, it does not have the proper structure and files needed to upload to Ionic View. Is there a guide I can follow to restructure my app in a minimal way so it can be accepted/uploaded when I run ionic upload?


How my app is currently structured:

image

I use gulp to concatinate all my scripts in the features folder, and my js/app.js file and output the final file into index.js (which contains my Angular module, controllers, services, etc.). The features folder also contains my templates.


Update: I created an ionic.project file, and moved my css, features, fonts and js folders and index.html file to a www folder and was able to upload the app. However, when I go to view my app in Ionic View, it loads and simply shows a blank view.

Just a note: When I test the app locally (by loading up www/index.html) the app works just fine. My gulp tasks also move any relevant files from bower_components into my www folder (the app doesn’t reference any files outside its www folder).

image


Solution: Got my app working (minus issue with the layout) on Ionic View. There are a couple things I did:

  1. Removed <base href="/"> from index.html (apparently the web view on mobile doesn’t like this). Consequently, I had to modify my router like so:
$locationProvider.html5Mode({
  enabled: true,
  requireBase: false
});
  1. To get my views to load I had to cache them (to prevent http requests to fetch the templates). For this I used gulp-angular-templatecache.