Key Concepts: *
Table of Contents
You need to install gulp-inject from npm
$ npm install gulp-inject --save-dev
This will add gulp-inject to package.json as a development dependency and install it so that you can use it.
Do the same thing with the paths for css files
css: ['./www/**/*.css', '!./www/css/ionic.app*.css', '!./www/lib/**']
Next we need to add a new gulptask called index. You could call it anything you wanted but for this lab it is called index.
In this section you will modify the ionic startup configuration to tell it to run the gulp index task when you run ionic serve.
Add the gulpStartupTasks section below
"gulpStartupTasks": [ "index", "watch" ]
Replace all of the script tags for your controllers and services with the inject:js comment below. Leave the app.js script tag.
<!-- inject:js --> <!-- endinject -->
Replace the css tag for the style.css with the inject:css command below
<!-- inject:css --> <!-- endinject -->
There is a lot of different options for the gulp-inject package. If you want to read about all of the different options and see examples, the documentation is available at https://www.npmjs.com/package/gulp-inject