【发布时间】:2017-03-14 13:33:02
【问题描述】:
我目前正在 jhispter(angularJS-spring) 中编程,我有一个问题, 在应用程序中实现一个 PDF 查看器。这个-> https://github.com/legalthings/angular-pdfjs-viewer
This is my error, im trying to read a pdf of antoher domain
尝试使用 $sce 但不起作用
我的控制器功能:{
function ViewerCustomController($scope,$sce) {
var vm = this;
var trustPDF = $sce.trustAsResourceUrl('http://www.pdf995.com/samples/pdf.pdf');
$scope.pdf = {
src: trustPDF,
}
}
如果您知道我如何将 jhipster 配置为 CORS 或授予 Access-Control-Allow-Origin 权限,请告诉我,谢谢。
【问题讨论】: