Windows Phone 8 Ionic 应用程序导航问题(混合应用程序) [英] Windows Phone 8 Ionic app navigation issue(Hybrid Application)

查看:38
本文介绍了Windows Phone 8 Ionic 应用程序导航问题(混合应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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

您需要为此任务安装一个应用程序.您想搜索在商店里买一个?"

"You need to install an app for this task. Would you like to search for one on the Store?"

当我点击一些链接(内部应用链接)时.请谁能告诉我为什么会这样.提前致谢.

When I click on some links (internal app links). Please can anybody tell me why this is happening. Thanks in advance.

推荐答案

Problem In 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>

您会注意到,当您单击 url 时,您会收到一条消息在 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(...)
      }
    ])

如果 本地 &动态图像未在应用中显示,然后添加与您的 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//);

欲了解更多详情,请查看此处link1link2 ,link3link4.

For more details to check here link1, link2 ,link3 and link4.

这篇关于Windows Phone 8 Ionic 应用程序导航问题(混合应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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