简体   繁体   中英

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.

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:

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.

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.

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.

The platformOverrides.js should be generated at compile-time from the various merges you have included in your project

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