sayanee/angularjs-pdf — pull request #18 by winkerVSbecks (2014-09-01 15:42:48+00:00)
Title: A more self contained directive

We were using this library for a project but, had a lot of issues trying to display multiple PDFs in one view. Therefore, we decided to make a few changes to make the directive completely isolated. I'm not sure if this is something you agree with but, it might be of interest to others.

- Made the directive a more self contained unit without polluting the parent scope.

- Removed the need for a template by using a simple inline template.

- The canvas element is grabbed using jqLite instead of an ID passed in.

- The directive now has an isolated scope.

- Switched to using a delegate service to control the directive.

- The delegate service allows you to access and control individual instances of a directive. This allows us to have multiple instances of the same directive in the same controller.

- All the pdf controls are available through the delegate.

- This allows the pdf controls to be placed in any view/sub-view.