I'm working on an ionic app (ionic v1.7.13, cordova v5.4.1). When I run
ionic run android -l
everything works fine, all my project files are properly loaded. The problem arises when I try to run without livereload, specifically because livereload causes issues when accessing device files.
ionic run android
When I run this command I see only the html file rendered, and in the dev tools I see
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///lib/ionic/css/ionic.css
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///css/style.css
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///lib/ionic/js/ionic.bundle.js
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///lib/ionic/js/angular/angular-resource.js
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///lib/ngCordova/dist/ng-cordova.js
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///cordova.js
Failed to load resource: net::ERR_FILE_NOT_FOUND file:///js/app.js
...
I can go through and add "android_asset/www/" to those routes and it works... but I think I must be missing something.
I'm looking for any guidance in others who have had this issue. Thanks!
turns out that trying to include html5location's in angular that it breaks the routes.
by removing <base href="/">
from my index.html file I fixed all the relative routes and my problem.
Cheers!
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