import * as angular from 'angular';

import {FileComponent} from './file/FileComponent';
import {FolderComponent} from './folder/FolderComponent';
import {BucketComponent} from './bucket/BucketComponent';

import './index.css';

// register components and configure the module.
angular
  .module('s3commander', [])
  .config(function ($sceDelegateProvider: any) {
    // https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider
    $sceDelegateProvider.resourceUrlWhitelist([
      'self',
      'https://s3.amazonaws.com/*',
      'https://*.s3.amazonaws.com/'
    ]);
  })
  .component('file', FileComponent)
  .component('folder', FolderComponent)
  .component('bucket', BucketComponent);

import * as angular from 'angular';

import {FileComponent} from './file/FileComponent';
import {FolderComponent} from './folder/FolderComponent';
import {BucketComponent} from './bucket/BucketComponent';

import './index.css';

angular
  .module('s3commander', [])
  .component('file', FileComponent)
  .component('folder', FolderComponent)
  .component('bucket', BucketComponent);

--- 
+++ 
@@ -6,8 +6,17 @@
 
 import './index.css';
 
+// register components and configure the module.
 angular
   .module('s3commander', [])
+  .config(function ($sceDelegateProvider: any) {
+    // https://docs.angularjs.org/api/ng/provider/$sceDelegateProvider
+    $sceDelegateProvider.resourceUrlWhitelist([
+      'self',
+      'https://s3.amazonaws.com/*',
+      'https://*.s3.amazonaws.com/'
+    ]);
+  })
   .component('file', FileComponent)
   .component('folder', FolderComponent)
   .component('bucket', BucketComponent);
Configure the s3commander module to whitelist form URLs.

By default AngularJS doesn't allow you to interpolate form URLs unless
they are whitelisted in the module's security policy. I added two URLs
for the AWS S3 API to the whitelist.
