Closed arifulhb closed 8 years ago
currently there is no UMD support for ng-embed so it won't work this way.
ic.. I managed to make it working with solid path. It can load pdf.. but my final goal is to fetch pdf from amazons3 and show there.. my amazon bucket is private but with proper auth, I can get the url, but the I frame not showing the file.
I used following code to make the url whitelisted to the iframe
$sceDelegateProvider.resourceUrlWhitelist([
// Allow same origin resource loads.
'self',
// Allow loading from our assets domain. Notice the difference between * and **.
'https://s3*.amazonaws.com/**'
]);
but still, the Iframe is just a white page.. Any idea whats going on or I am missing something?
BTW.. thanks for the nice project :)
may be due to cross domain policy. I will be rewriting this library in v4. Will make sure these are fixed . Maybe till then you can use embed.js by creating a directive.
Thanks again.. I'll try that.. cross domain policy issue was fixed by codes in previous comment.. it was like my application was forcing to download the content.. not to show inline.. solved the issue.. Nothing to do with your package. ng-embed is awesome :+1:
I've loaded the module via
npm install --save ng-embed
But when I wan to requireI get this error.
require() is working with other packages. Can't find out why its happening!