This project was generated with Angular CLI version 17.0.0-rc.3.
Boilerplate codes to fast track developing DHIS2 applications based on Angular framework
- NodeJs (16 or higher)
- git, can be installed by running
apt install git
Clone repository
git clone https://github.com/udsm-dhis2-lab/ng-dhis2-boilerplate.git <your-app-name>
Navigate to application root folder
cd <your-app-name>
Install all required dependencies for the app
npm install --legacy-peer-deps
NOTE: Since you are using this boilerplate to start your new app, it is recommended that you find and replace every occurance of ng-dhis2-boilerplate
with the name of your intended app. Also provide better description of your app in manifest.webapp
To start development server
npm start
Navigate to http://localhost:4200.
This command will require proxy-config.json file available in the root of your source code, usually this file has this format
{
"/api": {
"target": "https://play.dhis2.org/40.2.1",
"secure": "false",
"auth": "admin:district",
"changeOrigin": "true"
},
"/dhis-web-commons": {
"target": "https://play.dhis2.org/40.2.1",
"secure": "false",
"auth": "admin:district",
"changeOrigin": "true"
},
"/icons": {
"target": "https://play.dhis2.org/40.2.1",
"secure": "false",
"auth": "admin:district",
"changeOrigin": "true"
}
}
We have provided proxy-config.example.json
file as an example, make a copy and rename to proxy-config.json
To build the project run
npm run build
The build artifacts will be stored in the dist/
, this will include a zip file ready for deploying to any DHIS2 instance..
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.