简体   繁体   English

Cordova Windows Phone 8.1:引导模态错误

[英]Cordova Windows Phone 8.1: error with bootstrap modal

I'm trying to port a cordova application on WindowsPhone 8.1, and everything has worked (more or less) fine. 我正在尝试在WindowsPhone 8.1上移植cordova应用程序,并且一切正常(或多或少)正常。

Now I'm stucked in this problem: I'm using angular and bootstrap-ui, but when I try to open a popup (that works everywhere, also in ie) I get this error: 现在,我陷入了这个问题:我使用的是angular和bootstrap-ui,但是当我尝试打开一个弹出窗口(在任何地方都可以使用,也可以在ie中)时,出现此错误:

Error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property to add script or malformed HTML will generate this exception. Use the toStaticHTML method to filter dynamic content, or explicitly create elements and attributes with a method such as createElement.  For more information, see http://go.microsoft.com/fwlink/?LinkID=247104.

I have already tryed out this: Using AppendTo/jquery-win8 in Win8 apps and this http://blog.jonathanchannon.com/2013/01/24/using-angularjsbackbonejs-in-windows-8-javascript-app/ but that have not worked. 我已经尝试过了: 在Win8应用中使用AppendTo / jquery-win8,以及http://blog.jonathanchannon.com/2013/01/24/using-angularjsbackbonejs-in-windows-8-javascript-app/没有工作。

Any suggestion on how to fix this? 关于如何解决此问题的任何建议?

I've had the same issue on a few of the projects I started - this seems to happen especially if you running the application from Visual Studio. 我在开始的几个项目中都遇到了同样的问题-尤其是如果您从Visual Studio运行应用程序,这似乎会发生。

The one trick that i found that works is in your main page (where you would include all you JavaScript references) is to reference the platformOverrides.js file before the reference to the angular.js file. 一个招,我发现,工作是在你的主页(你将包括所有你的JavaScript引用)是参照angular.js文件之前引用platformOverrides.js文件。

The platformOverrides.js should be generated at compile-time from the various merges you have included in your project 应该在编译时从项目中包含的各种合并中生成platformOverrides.js

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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