Reputation: 16373
I used the Angular 8 cli to create a base angular app and haven't modified it one bit except for adding support for Cordova. I created a seperate project folder to hold the Cordova project that way both projects are kept seperate as suggested in this article. No matter what, this basic angular app will not launch in Cordova. I see the cordova.js file in the platform/browser/www folder but for some reason the project never loads it and there are no errors of any kind anywhere to give me a hint on what the problem is.
Upvotes: 0
Views: 766
Reputation: 16
Well. My problem must be something else. I'm using Angular 8.2.8 and the latest Cordova version. I create a barebones Angular project (ng new test) and a barebones cordova project (cordova create test). To avoid the problems mentioned by @Helzgate, i wrote all the code by hand from the very same article he pointed.
When running in browser mode, all seems ok. Deviceready event is fired, cordova.js is called and everything works as expected, but when changed to android i just got a blank screen. No signs of any activity even when debugged in Android Studio.
One note. I even downgraded the android sdk image to match my phone's version with no results. If someone gets this two barebones projects to work i'll appreciate any hint.
Upvotes: 0
Reputation: 503
I came across similar issue due to copying script include snippet from some article.
Check the enclosing double quotes characters.
Make sure that script include snippet is placed inside body tag.
Upvotes: 0
Reputation: 16373
The problem was that when I copied the following text from this website,
<script type=”text/javascript” src=”cordova.js”></script>
The quotes were in the incorrect format and won't work. You have to replace the quotes.
Upvotes: 2