Skip to content
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

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open

Isolated scope #209

wants to merge 24 commits into from

Conversation

endorama
Copy link
Contributor

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 named NgPdfViewer.

Thanks!

Copy link
Collaborator

@dennybiasiolli dennybiasiolli left a 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) => {
Copy link
Collaborator

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?

@endorama
Copy link
Contributor Author

endorama commented Sep 19, 2017 via email

@dennybiasiolli
Copy link
Collaborator

@endorama yes, it's a good idea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants