Overview
Docs
For development environment, here are mandatory utilities.
- Npm (Nodejs) : Refer to https://nodejs.org/download/
- Ionic v3 : version 3++
-
Install dependencies
npm install -g ionic #install ionic-cli globally
-
Make sure your ionic is running at least v3 and above by running
ionic -v
commandionic -v # example version number (> 3) from the command above
-
If you have problem installing ionic, please uninstall current version of ionic with the following and repeat the step 1 & 2 above again to install ionic correctly.
npm uninstall -g ionic
-
after git clone with
git clone [email protected]:intersective/practera-sdk-ionic.git
-
change directory into the project folder
cd practera-sdk-ionic
-
Install node dependencies
npm install
-
To run app locally
ionic serve
-
Ionic Deeplinking/Routing Deeplinking allow a URL to auto redirect user into a specific page in the App. We also use named url parameters in URL, for example,
http://example.com?parameter_name=example_value
for specific feature to adapt backward-compatible consideration.For example, using pagename in do parameter:
-
Reset password:
http://example.com?do=resetpassword&[email protected]&key=abcdefg
-
Registration:
http://example.com?do=registration&[email protected]&key=abcdefg
-
-
Copy
src/configs/config.ts.default
tosrc/configs/config.ts
. Change your appkey insideconfig.ts
based on the appkey in your database. -
Start server or initiate app
ionic serve
-
Cached web content - If you found what you see in browser isn't updated as expected after you've changed the codebase, you can try:
- Make sure
ionic serve
in your terminal if it is still running - Activate browser
Developer Mode
in Chrome/Safari/Firefox -OPT + CMD + I
- Empty cache
- Chrome
- Application Tab
- Clear Storage
- click '[Clear selected]' button
- Safari
- Select
Develop
- Disable cache
- Empty cache or
OPT + CMD + E
- Select
- Firefox
- Get into
Preference
(use shortcut keyCMD + ,
) - Select
Advanced
- At the
Cached Web Content
click '[Clear Now]' button
- Get into
- Chrome
- Make sure
-
To clear npm cache, if you get prompted about
node-sass
, run command belownpm rebuild node-sass
-
To make sure your npm package installed has the latest/match
package.json
dependencies correctly# reinstall after node_modules & npm cache cleared rm -fr node_modules rm -fr package-lock.json npm cache clean --force npm install