This is ionic app.
- nodejs 5+
- bower
- ionic 1.3.1+
- cordova 6+
- git
- gulp(Install gulp globally with command
npm install -g gulp-cli
) You must also install java, android sdk for android platform, xcode for ios platform.
Edit configuration in config.json
, You can use environment variable BUILD_ENV to load configurations for different environments.
Following variables can be configured:
APP_VERSION
the version of appAPI_TITLE
the title of appAPI_URL
the url of api serverAPI_TOKEN
the api token
Please deploy backend codes through guides in backend.
I recommend you to test codes under Mac to test with ios and android platform easily.
Please make sure to configure url of api server rightly in config.json
.
Please update global ionic,cordova to latest version with npm install -g cordova ionic
.
For example this is known bug that has been fixed since ios4.1.0 ios bug.
In the main project folder, run the following commands:
npm i
# must exists git in path
bower install or gulp install
ionic state reset --plugins
gulp inject
#verify codes by browser
ionic serve
#command for android
ionic platform add android
ionic build android
# test on emulate or real device
ionic emulate android or ionic run android
#command for ios
ionic platform ios
ionic build ios
# test on emulate or real device
ionic emulate ios or ionic run ios
##modular It will use gulp to load modules.You can put modules in src/components, root directory of module may exist menu_{index}.html(index is order of side menu) to show as menu. You can also exist css or configuration files in modules.
If you delete entire directory from src/components you must run gulp
again to make sure changes work.
It wiletect and load js,css from bowser.json properly, you only need to inject angular modules with environment variable ANGULAR_MODULES, currently it has default value 'ionic','ngResource','ya.nouislider'.