简体   繁体   中英

Angular2 not loading in cordova app

i have created cordova app which is running fine in browser while deploy the same in android mobile its not running. I am using angular 2 in this app. When i did the remote debugging I saw the following error in console.

Failed to load file:///android_asset/www/lib/@angular/platform-browser-dynamic//bundles/platform-browser-dynamic.umd.js Failed to load resource: net::ERR_FILE_NOT_FOUND

错误

Then i check the source tab in developer tool the angular lib folder is not shown there.

错误

when i check the same while running in browser the angular files shown in source tab

错误

What may cause this issue?

fixed the issue. in the JS reference i have one extra slash that cause the problem

file:///android_asset/www/lib/@angular/platform-browser-dynamic //bundles/ platform-browser-dynamic.umd.js

After removing the extra slash now working in mobile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM