Ionic Visual Studio 2015模板get'Angular is undefined'错误时试图启动调试为Windows [英] Ionic Visual Studio 2015 template get 'Angular is undefined' error when trying to start in debug for Windows

查看:420
本文介绍了Ionic Visual Studio 2015模板get'Angular is undefined'错误时试图启动调试为Windows的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始看看Cordova的Visual Studio工具和Ionic模板。



为Android和IOS构建和调试(F5)纹波仿真器)似乎工作正常,但是,我不能得到这个工作在Windows。我在Windows 8.1机器上使用VS 2015。



对于Windows(任何CPU和64位),我遇到了MSVSMON.exe的问题,但这将我



所以,我尝试运行为x86,并得到以下错误(本地设备)

  SCRIPT5009:
第8行第1列的未处理异常ms-appx://io.cordova.myappe2785d518e9f4f6ea03055878dd7a400/www/js/app.js
0x800a1391 - JavaScript运行时错误:'angular'未定义
app.js(8,1)
HTML1300:导航发生。
index.html
APPHOST9601:无法加载< http://code.ionicframework.com/1.0.0-rc.5/css/ionic.css> ;.应用程序无法在
本地上下文中加载远程Web内容。
index.html
APPHOST9601:无法加载< http://code.ionicframework.com/1.0.0-rc.5/js/ionic.bundle.min.js>应用程序无法在本地上下文中加载远程Web内容。
index.html

SCRIPT5009:ms-appx中第1行第1列的未处理异常://io.cordova.myappe2785d518e9f4f6ea03055878dd7a400/www/js/controllers.js
0x800a1391 - JavaScript运行时错误:'angular'未定义
controllers.js(1,1)



解决方案

div>

首先转到



index.html after


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

这篇关于Ionic Visual Studio 2015模板get'Angular is undefined'错误时试图启动调试为Windows的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆