I am developing an hybrid app for android and wp8 using ionic. It works fine on android platform but when i recently use this on wp8, it is showing me ""You need to install an app for this task do you want to search it on store?." when i click on some links (internal app links). Please can anybody tell me why this is happening. Thanks in advance.
0
votes
1 Answers
0
votes
Seems like the ms-appx that is being added by ms causes the problem.
To solve this issue, we need to notify AngularJS that links with an ms-appx prefix are a-okay by us. Luckily AngularJS supports this functionality. But how it supports it varies across AngularJS versions.
AngularJS 1.2+: $compileProvider.aHrefSanitizationWhitelist
AngularJS <1.2: $compileProvider.urlSanitizationWhitelist
The best place to put this code is inside your app.js file. The code I'm using on Windows Phone is as follows:
.config(function($stateProvider, $compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|ghttps?|ms-appx|x-wmapp0):/);