-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isolated scope #209
base: master
Are you sure you want to change the base?
Isolated scope #209
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR looks good to me, if we fix tests we can proceed and merge ;)
$scope.pdfConfig = new NgPdfFactory('pdf/relativity.pdf', { fitToPage: true }); | ||
$scope.protectedPdfConfig = new NgPdfFactory('pdf/relativity.protected.pdf', { fitToPage: true, useCredentials: true, password: 'test' }); | ||
|
||
$scope.$watch('pdfUrl', (newVal, oldVal) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are broken on PhantomJS with ES6 sintax, maybe we can try to update PhantomJS or use old ES5 sintax?
@*dennybiasiolli *as this is a complete new version, may I propose to
remove phantomjs and instead use the new chrome headless?
|
@endorama yes, it's a good idea |
Hello @dennybiasiolli @NicoBurno, sorry for the long delay!
As I've seen no progression on this ( no pun intended! ), and I had a Torino OpenSource Saturday to spend on this, here is my implementation for the isolated scope.
This is a full refactor of the previous implementation :) All features are preserved ( apart custom http headers ).
The refactor is based on a factory object, which creates an object that can be used to manipulate the viewer status.
Please have a look and ask questions!
The
NgPdfFactory
should be more appropriately namedNgPdfViewer
.Thanks!