How-to: Use different environment variables for production and development with ionic 3

Create 2 configuration files with environment variables in folder src/config: config.dev.ts and config.prod.ts


Update: For Ionic < 3.7

Override 2 configuration files provided by @ionic/app-scripts package: optimization.config.js and webpack.config.js

Notify ionic to use these overridden files by adding links to them to package.json


Update: For Ionic >= 3.7

Override webpack.config.js, provided by @ionic/app-scripts package.

Notify ionic to use overridden file by adding link to package.json


Instruct TypeScript to use custom alias for a module by editing tsconfig.json

Finally, use your environment variables

Animations stop working after building project scaffolded by Fountain Webapp Generator

Fix is very quick and clean. In gulp_tasks/build.js pass additional parameters to cssnano:

 

How-to: Display images obtained from cordova-plugin-camera in ionic with live reload

  1. Install cordova-plugin-file.
  2. Obtain file URI from cordova-plugin-camera and convert it to cdvfile://

How-to: Use angular-templatecache with ionic

From project’s directory execute next command in order to install angular-templatecache

Modify your gulpfile.js

Don’t forget to reference ‘templates’ dependency in your www/js/app.js

Don’t forget to reference www/js/dist/templates.js in your index.html file.

Start debugging with

Run next command to rebuild template cache