title: Using $sceDelegateProvider to whitelist Youtube in Typescript
body: <p>I'm trying to allow users to enter Youtube URL's so I can display the videos on my site, but I need to whitelist Youtube first.  How can I fix my app.ts file to accommodate this in typescript?  The documentation looks something like this:</p>
  
  <pre><code>.config(function ($sceDelegateProvider) {
      $sceDelegateProvider.resourceUrlWhitelist([
          'self',                    // trust all resources from the same origin
          '*://www.youtube.com/**'   // trust all resources from `www.youtube.com`
      ]);
  });
  </code></pre>
  
  <p>The problem is that my .config doesn't contain the function keyword, I believe because I'm using typescript.  My config currently looks like this:</p>
  
  <pre><code>angular.module('MyApp', ['ngRoute', 'ngResource']).config(($routeProvider: ng.route.IRouteProvider, $locationProvider: ng.ILocationProvider, $sceDelegateProvider: ng.ISCEDelegateProvider ) =&gt; {
          $sceDelegateProvider.resourceUrlWhitelist([
              'self',                    // trust all resources from the same origin
              '*://www.youtube.com/**'   // trust all resources from `www.youtube.com`
          ]);
  </code></pre>
  
  <p>I'm getting the same error that the url isn't being whitelisted.  Do I need to just paste the .config with the function in a different area, or is there a way to include the Delegate provider in the same place as my route provider and location provider, etc?  </p>