Angular2是否有等效的$ sceDelegateProvider.resourceUrlWhitelist和$ sceDelegateProvider.resourceUrlBlacklist?

时间:2016-07-06 15:56:15

标签: angular angular2-services

Angular2是否有等效的 $ sceDelegateProvider.resourceUrlWhitelist $ sceDelegateProvider.resourceUrlBlacklist

https://docs.angularjs.org/api/ng/provider/ $ sceDelegateProvider

1 个答案:

答案 0 :(得分:2)

有!在Angular2中,您可以导入并使用SafeResourceUrlDomSanitizationService,如我的博客中所述:

http://meshfields.de/embed-youtube-videos-ionic2-angular2/