2015-05-21 67 views
1

我正在開發使用Ionic的Android和WP8混合應用程序。它適用於Android平臺的罰款,但是當我最近使用這種WP8上,它顯示我Windows Phone 8 Ionic應用程序導航問題(混合應用程序)

「你需要安裝一個應用程序執行此任務。你想搜索 一個在商店?」

當我點擊一些鏈接(內部應用程序鏈接)。請有人能告訴我爲什麼會發生這種情況。提前致謝。

enter image description here

回答

4

問題。在Windows手機由於MS-APPX IE問題

當您在Windows Phone上的應用程序中使用NG-href和動態的URL,爲例如:

<a ng-href="#/view/"> click here </a> 

你會注意到當你點擊url時,y你會收到一條消息「在appstore中搜索應用程序?」。您收到此消息是因爲AngularJS無法處理Windows Phone IE添加的前綴。您可以通過將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\//); 

有關詳細信息在這裏檢查link1link2link3link4

0
+0

我已經安裝了這個插件,但我得到了同樣的問題,也出現了其他問題,如滾動和收集重複不工作,而不是我用ng-repeat指令來顯示離子應用程序中的列表。 –

0

關於此發佈What is x-wmapp2 and x-wmapp1?它也可能是diserable有這樣的事情:

$compileProvider.aHrefSanitizationWhitelist(/^\s*(g?https?|ftp|mailto|tel|file|local|ms-appx|x-wmapp\d+):/); 

而不是隻有我用我的正則表達式x-wmapp\d+x-wmapp0

相關問題