I filed an issue at JIRA here: https://issues.apache.org/jira/browse/CB-7843 and send a PR with fix: https://github.com/apache/cordova-wp8/pull/63.
Fixed __XHRShimAliases object re-initialization on each window.location change. Regarding other things: $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel|x-wmapp0):/); and $locationProvider.html5Mode(false); seems to be related to angular configuration and not relates to WP8 XHRHelper at all. --------------- Best regards, Vladimir -----Original Message----- From: Kyung-man Kwak [mailto:[email protected]] Sent: Friday, 17 October, 2014 10:18 To: [email protected] Subject: XHRHelper.cs has problems in hash changes. Dear cordova developers, I have several problem in following environment. *Environment :* - *Cordova 3.6.3* - *platform : wp8* - *AngularJS v1.2.6* *Problems :* - anchor tag - ng-href or href is not working. A simple url is working, but it is not working when only hash part is changed in the previous url. - angulerjs routing - it is working with param "template" (this is template string). - it is not working with param "tempalteUrl" (this is just url of template) - angularjs $location.url(~~) - it is ok before getting template. it is blocked in $http which is for getting template. *Reason : * - in my guess, XHRHelper.cs file has a problem. - the variable script in this file is reloaded every time url is changed including hash change. And variable __XHRShimAliases is also initialized at this time. So, __onXHRLocalCallback function is not properly working. *My temporary solution :* 1. add following code in module config $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|tel|x-wmapp0):/); $locationProvider.html5Mode(false); 2. In XHRHelper.cs file( https://apache.googlesource.com/cordova-wp8/+/3.6.x/wp8/template/cordovalib/XHRHelper.cs), I added following code in the first line of script. ... string script = @"(function(win, doc) { if (window.XHRHelperInitialized) { return; } window.XHRHelperInitialized = true; var __XHRShimAliases = {}; ... I hope this issue is patched next version. :) Thank you for reading this issue. Kyungman Kwak. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
