Ravin Singh D
Ravin Singh D

Reputation: 893

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

Error

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

Error

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

Error

What may cause this issue?

Upvotes: 3

Views: 701

Answers (1)

Ravin Singh D
Ravin Singh D

Reputation: 893

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

Upvotes: 1

Related Questions