asafdav / ng-s3upload

Upload to S3 using AngularJS
MIT License
190 stars 83 forks source link

Allow getManualOptions to be a function #58

Open soerface opened 9 years ago

soerface commented 9 years ago

I would like to fetch the options on my own, but with the current implementation of getManualOptions, the object must be resolved before the directive is loaded. I thought that it would be good to fetch the object in the view, but doing this does not allow me to create the getManualOptions variable before loading the directive. Therefore, I thought it would be useful to allow getManualOptions to be a function, fetching the options when needed. If there is another way doing it without changing this code, I would also be happy about hearing about it.

@Serhioromano, you implemented the getManualOptions feature like it is now, how did you resolved the object before the directive beeing loaded?

Serhioromano commented 9 years ago

Hmmm, let's see, .... Actually I do not know :smile:

I did not need to make sure it is resolved before. All I wanted the way to pass manual options. And then everything just worked out for me.