I have a nightmare trying to implement a whitelist for URLs that load into the ng-include cross domain.
I have an include that works fine locally:
<div ng-include="'http://test-domain.com/framework/includes/main-menu.html'"></div>
Then I added the whitelist so ...
angular.module('myApp', ['ngRoute','ngResource'])
.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self',
'http://test-domain.com/framework/includes/**'
]);
});
But I'm still getting "XMLHttpRequest cannot load" errors in all browsers. It drives me crazy, is there any way around this? Did I miss something else to get this to work in the cross domain? Please help. Thanks
source
share