简体   繁体   中英

Ionic Visual Studio 2015 template get 'Angular is undefined' error when trying to start in debug for Windows

I am just starting to look at the Visual Studio tools for Cordova, and the Ionic template.

Build and debugging (F5) for Android and IOS (using the ripple emulator) seems to work fine, however, I cannot get this to work for Windows. I am using VS 2015, on a Windows 8.1 machine.

For Windows (any CPU and 64 bit) I get a problem with the MSVSMON.exe, but this I will ask in a separate post.

So, I try and run as x86, and I get the following errors (local device)

SCRIPT5009: Unhandled exception at line 8, column 1 in 
ms-appx://io.cordova.myappe2785d518e9f4f6ea03055878dd7a400/www/js/app.js
0x800a1391 - JavaScript runtime error: 'angular' is undefined
app.js (8,1)
HTML1300: Navigation occurred.
index.html
APPHOST9601: Can't load <http://code.ionicframework.com/1.0.0-rc.5/css/ionic.css>. An application can't load remote web content in the   
local context.
index.html
APPHOST9601: Can't load <http://code.ionicframework.com/1.0.0-rc.5/js/ionic.bundle.min.js>. An application can't load remote web content in the local context.
index.html

SCRIPT5009: Unhandled exception at line 1, column 1 in ms-appx://io.cordova.myappe2785d518e9f4f6ea03055878dd7a400/www/js/controllers.js
0x800a1391 - JavaScript runtime error: 'angular' is undefined
controllers.js (1,1)

Anybody have any ideas why this doesn't work?

Thanks in advance

First go to http://code.ionicframework.com

Download the latest zip (currently ionic-1.1.1) ... extract it somewhere then copy the contents of the ionic-1.1.1\\release folder to the www of the project.

Then in the index.html of the project replace ionic.css and ionic.bundle.min.js with the ones from the files you copied.

The last step is to download winstore-jscompat and add a refrence to the top of index.html

That's it (u may not need all the files from the \\release of the zip)

Starting index.html 在此处输入图片说明

index.html after 在此处输入图片说明

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