How can I specify an angular environment on ionic build?
You can add a corresponding configuration entry in angular.json at ionic-cordova-build:
"ionic-cordova-build": {
"builder": "@ionic/angular-toolkit:cordova-build",
"options": {
"browserTarget": "app:build"
},
"configurations": {
"production": {
"browserTarget": "app:build:production"
},
"staging": {
"browserTarget": "app:build:staging"
}
}
},
$ ionic cordova run android --device -c staging
Note the difference from -c staging
to -- -c=staging
on ionic serve.
The configuration staging must exists under architect.build.configurations
in the same file.