I am creating an Angular + Cordova application and it works great in the browser.
The issue what I am facing is that when I try to include cordova.js
file, the app goes blank when loaded on a device. I have done some research and it turns out to be something with cordova.exec
and zone.js
used in Angular causing the issue.
I would like a solution on how to properly include cordova.js
in an Angular based project.
Cordova
android 8.0.0
ios 5.0.1
Angular
@angular-devkit/architect 0.801.1
@angular-devkit/build-angular 0.801.1
@angular-devkit/build-optimizer 0.801.1
@angular-devkit/build-webpack 0.801.1
@angular-devkit/core 8.1.1
@angular-devkit/schematics 8.1.1
@ngtools/webpack 8.1.1
@schematics/angular 8.1.1
@schematics/update 0.801.1
rxjs 6.4.0
typescript 3.4.5
webpack 4.35.2
Try these:
This youtube video says we need to change the <base href="/">
in your index.html to <base href="./">
. If that doesn't work, try changing your type="module"
to type="text/javascript"
in your index.html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With