How to create a configuration to run with $ ionic cordova emulate android -l -c local
and let the emulator connect to host PC, accessing through 10.0.2.2
instead if localhost
.
Create the file environment.local.emulator.ts
. Then appli these changes to angular.json
.
-
Add this snippet under
project.app.architect.build.configurations
:
"local-emulator": {