"ionic serve" - How to inject new Files (css/js/...)


#1

Hi Everyone,
I’am new to ionic and hope someone can answer this simple question for me:

While running “ionic serve”, it reconizes newly created files, how can I automaticly inject those files in “index.html” for loading?
I’am allready toying around with “gulpStartupTasks” and “gulp-inject” / “gulp-angular-filesort”, but the “Gulp Startup Tasks” run only once and not with every change.

How do you do this? Do you include all your files manually? Do you manually run a gulp task?
What are your suggestions?
yours b.Schreiber


#2

I am trying to do the same. Strangely when I delete a file it updates index.html but then stops working… and i have to manually run gulp


#3

I had exactly the same issue that I was trying to solve. Not having to update the index.html file manually.

I used to gulp watch and gulp inject to achieve this and documented it here. http://bjornholdt.me/gulp-inject-and-ionic/

Hope it helps :slight_smile: