ng-pdfviewer
ng-pdfviewer copied to clipboard
Setting up the controller without the array
Is there a way to set this up without the array in the controller?
You have:
.controller('CaseCtrl', ['$scope','PDFViewerService', function ($scope, pdf ) {
I'd prefer to use:
.controller('CaseCtrl', function ($scope, pdf ) {
Mainly because I'm injecting a bunch of other stuff and don't know all the declarations for them on the array side of things.
Substitute pdf
with PDFViewerService
.
The array is a method used to inject proper variable names when minifying/uglifying.
I use grunt and ng-min to do this, so handling it manually isn't necessary for me:
.controller('CaseCtrl', function ($scope, PDFViewerService ) { ... })
Then, wherever the example showed pdf.
use PDFViewerService.
instead. Or simply rename it
var pdf = PDFViewerService;