I am looking to load html partials from Amazon S3 by uploading them and using the public URLs like this:
'use strict';
/* App Module */
var phonecatApp = angular.module('phonecatApp', [
'ngRoute',
'phonecatAnimations',
'phonecatControllers',
'phonecatFilters',
'phonecatServices'
]);
phonecatApp.config(['$routeProvider',
function($routeProvider) {
$routeProvider.
when('/phones', {
templateUrl: 'https://s3-us-west-2.amazonaws.com/playfield/phone-list.html',
controller: 'PhoneListCtrl'
}).
when('/phones/:phoneId', {
templateUrl: 'https://s3-us-west-2.amazonaws.com/playfield/phone-detail.html',
controller: 'PhoneDetailCtrl'
}).
otherwise({
redirectTo: '/phones'
});
}]);
However, I encounter an error like this:
[$sce:insecurl] Blocked loading resource from URL not allowed by $sceDelegate policy.
When I switch to a partial from a different domain like this:
templateUrl: '/partials/phone-list.html'
It works perfectly fine.
Any assistance would be appreciated. Thank you.