Start Ionic Project with files from repo, not seed app

Hello,

I have started and given up on Ionic three times. :smile:

My problem is that I want to stick to some application and build system guidelines when building an Angular app, therefore I don’t like at all the structure of the seed-app, I have tried and tried to integrate it in my build system.

It’s based on ng-boilerplate.

Long story short, I get a blank screen, stuff seems to be loading, but the ui-router does not load the first template (I have integrate the code from the seed-app in my app), or so I guess.

I am completely stumped.

ng-boilerplate uses $templateCache to compile all the template in one big js file and when it’s parsed it creates virtual paths to those template, which are working in any combination that I have tried in previous projects.

This is what gets rendered in the ion nav view: https://www.dropbox.com/s/up71dfkdanzba0g/Screenshot%202014-03-20%2023.25.30.png

The guess I have now, the third time I’m picking this up, is that maybe the templates.app file is not ready when the ui-router tries to config the paths, but I am not sure.

Any ideas?

Other thoughts, is the file order OK ? I was loading files using AMD and $scriptJS but I gave that up to test all this and maybe get it working.

Thanks,
Arthur

EDIT: Nevermind, I’m a dumba**, I changed the files name in tpl.html so the grunt system would take them, but I did not changed the name of the files in the config … ffs.

The second time I tried to make it run I’ve spend half a day focusing on other matters, but the symptoms were the same, templates would not load.

Ironically, I had to figure it out once I made the first post :smile:

I highly recommend using yeoman to start a new project:

npm install -g yo generator-ionicjs
mkdir project
cd project
yo ionicjs
grunt serve

WHOA!

This is what I have always wanted, but I guess I got yeoman out of mind.

Anyhow, I managed to make it work on my grunt system, and to be honest, I think the build system I am using is MUCH more tidy and modular than yo’s ionic-generator (just took a peek at it).

Anyhow, thank you a lot, I should asked this question the first time I was stuck, like two months ago :smiley: