Currently this project is using the latest versions of all: Ionic and Angular 4
Requirements to use this project:
Node.js (https://nodejs.org/)
In case you're not with the latest version of npm:
sudo npm install npm -g
To install both of them on your system just launch this command:
sudo npm install cordova ionic -g
Once you clone this repository, run this command on your terminal to install all needed dependencies:
npm install
Run this command on your terminal to add a platform and install all needed puglins:
Android:
ionic cordova platform add android
ionic cordova run android
iOS:
ionic cordova platform add ios
ionic cordova run ios
Create a default file src/environments/environment.ts
which will be used for your PRODUCTION environment:
export const ENV = {
mode: 'Production'
}
Create a default file src/environments/environment.dev.ts
which will be used for your development environment:
export const ENV = {
mode: 'Development'
}
You can then import your environment variables anywhere!
import { ENV } from '@app/env'
IONIC_ENV=prod ionic serve # to serve our project with prod env
IONIC_ENV=prod ionic cordova build android --prod # to build our android project with prod env
ionic serve # to serve our project with dev env