Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Setting up the controller without the array #7

Open
wmbutler opened this issue Apr 29, 2014 · 1 comment
Open

Setting up the controller without the array #7

wmbutler opened this issue Apr 29, 2014 · 1 comment

Comments

@wmbutler
Copy link

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.

@joseym
Copy link

joseym commented May 12, 2014

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;

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

No branches or pull requests

2 participants