I am having a nightmare trying to implement whitelisting for url's that are loading into ng-include cross domain.
I have an include which works fine locally:
<div ng-include="'http://test-domain.com/framework/includes/main-menu.html'"></div>
I then have the whitelist added like so...
angular.module('myApp', ['ngRoute','ngResource'])
.config(function($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
// Allow same origin resource loads.
'self',
// Allow loading from our assets domain. Notice the difference between * and **.
'http://test-domain.com/framework/includes/**'
]);
});
But i am still getting 'XMLHttpRequest cannot load' errors across all browsers. This is driving me insane, is there a way around this? Am i missing something else to get this to work cross-domain? Please help. Thanks