Windows Phone 8 Ionic 应用程序导航问题(混合应用程序)
Windows Phone 8 Ionic app navigation issue(Hybrid Application)
我正在使用 Ionic 为 Android 和 WP8 开发混合应用程序。它在 Android 平台上运行良好,但当我最近在 WP8 上使用它时,它显示
"You need to install an app for this task. Would you like to search
for one on the Store?"
当我点击某些链接(应用程序内部链接)时。请任何人告诉我为什么会这样。提前致谢。
问题 windows phone 由于 ms-appx IE 问题 :
当您在 Windows Phone 上的应用中使用 ng-href 和动态 url 时,例如:
<a ng-href="#/view/"> click here </a>
您会注意到,当您单击 url 时,您会收到一条消息 "Search for app in appstore?"。您收到此消息是因为 AngularJS 无法处理 Windows Phone IE 的前缀 adding.You 可以通过将 HTML5 他添加到您的应用程序来轻松解决此问题.
.config([
'$compileProvider',
function ($compileProvider)
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);
// Angular before v1.2 uses $compileProvider.urlSanitizationWhitelist(...)
}
])
如果 本地和动态图像未在应用程序中显示,则添加与您的 app.js
相同的内容
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|content|ghttps?|ms-appx|x-wmapp0):|img\//);
关于这个帖子 What is x-wmapp2 and x-wmapp1? 有这样的东西也可能是令人讨厌的:
$compileProvider.aHrefSanitizationWhitelist( /^\s*(g?https?|ftp|mailto|tel|file|local|ms-appx|x-wmapp\d+):/ );
我在正则表达式中使用 x-wmapp\d+
而不是 x-wmapp0
。
我正在使用 Ionic 为 Android 和 WP8 开发混合应用程序。它在 Android 平台上运行良好,但当我最近在 WP8 上使用它时,它显示
"You need to install an app for this task. Would you like to search for one on the Store?"
当我点击某些链接(应用程序内部链接)时。请任何人告诉我为什么会这样。提前致谢。
问题 windows phone 由于 ms-appx IE 问题 :
当您在 Windows Phone 上的应用中使用 ng-href 和动态 url 时,例如:
<a ng-href="#/view/"> click here </a>
您会注意到,当您单击 url 时,您会收到一条消息 "Search for app in appstore?"。您收到此消息是因为 AngularJS 无法处理 Windows Phone IE 的前缀 adding.You 可以通过将 HTML5 他添加到您的应用程序来轻松解决此问题.
.config([
'$compileProvider',
function ($compileProvider)
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);
// Angular before v1.2 uses $compileProvider.urlSanitizationWhitelist(...)
}
])
如果 本地和动态图像未在应用程序中显示,则添加与您的 app.js
相同的内容 $compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|blob|content|ghttps?|ms-appx|x-wmapp0):|img\//);
关于这个帖子 What is x-wmapp2 and x-wmapp1? 有这样的东西也可能是令人讨厌的:
$compileProvider.aHrefSanitizationWhitelist( /^\s*(g?https?|ftp|mailto|tel|file|local|ms-appx|x-wmapp\d+):/ );
我在正则表达式中使用 x-wmapp\d+
而不是 x-wmapp0
。