I need to whitelist Youtube by injectin sceDelegateProvider. The problem I
am running into is that my .config in my app.ts file looks different than
all of the other examples I'm seeing. I'm guessing this difference is
because I'm using typescript.
Here is the suggested code to enter into your app.ts file:
angular.module('MyApp', ['ngRoute', 'ngResource']).config(function
($sceDelegateProvider) {
$sceDelegateProvider.resourceUrlWhitelist([
'self', // trust all resources from the same origin
'*://www.youtube.com/**' // trust all resources from `www.youtube.com`
]);
});
However, my version doesn't have the "function" keyword, and looks like the
code below. How can I get the two to marry? I've tried putting the above
code in a whole bunch of different places and just keep getting the same
error that I need to whitelist Youtube. Thanks!
angular.module('MyApp', ['ngRoute', 'ngResource']).config(($routeProvider:
ng.route.IRouteProvider, $locationProvider: ng.ILocationProvider, => {
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.