问题描述
我正在使用Ionic开发Android和WP8的混合应用程式。它在Android平台上正常工作,但是当我最近在WP8上使用它时,它显示我
I am developing an hybrid app for Android and WP8 using Ionic. It works fine on Android platform but when I recently used this on WP8, its showing me
当我点击一些链接(内部应用链接)。请任何人告诉我为什么会发生这种情况。提前感谢。
When I click on some links (internal app links). Please can anybody tell me why this is happening. Thanks in advance.
>
推荐答案
问题在Windows Phone中由于 ms-appx IE问题:
Problem In windows phone Due to ms-appx IE problem :
在Windows Phone上的应用程序中使用ng-href和动态url时,例如:
When you use ng-href and dynamic url's in your app on Windows Phone, for example:
<a ng-href="#/view/"> click here </a>
您会注意到,当您点击网址时,会收到一条消息在appstore中搜索应用?。您收到此邮件是因为AngularJS无法处理Windows Phone IE正在添加的前缀。您可以通过将HTML5添加到您的应用程序来轻松解决此问题。
You will notice that when you click on the url, you get a message "Search for app in appstore?". You receive this message because AngularJS can't handle the prefix that Windows Phone IE is adding.You can resolve this easily by adding an HTML5 him to your app.
.config([
'$compileProvider',
function ($compileProvider)
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);
// Angular before v1.2 uses $compileProvider.urlSanitizationWhitelist(...)
}
])
如果 local&动态图片未显示,然后添加以下与您的app.js相同
And if local & dynamic images are not showing in app then add following same as your app.js
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|content|ghttps?|ms-appx|x-wmapp0):|img\//);
有关详情,请参阅,,和。
For more details to check here link1, link2 ,link3 and link4.
这篇关于Windows Phone 8 Ionic应用程序导航问题(混合应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!