Open eestein opened 8 years ago
Please, add a Typescript example to use ng-file-upload. It is almost impossible to find examples using ng-file-upload with typescript, an example would be very welcome.
What kinds of examples are you looking for @eestein and @apiweb ? I use the examples with Typescript with minimal changes.
@andersnorgaard basic examples like a "Getting Started" tutorial. I wasn't able to get the lib to work using TS so an example would tell me what am I doing wrong.
@eestein But do you already have a working Typescript + AngularJS setup? I did, and adding this module was painless.
When using this in typescript, if you inject the upload service as a typed variable, e.g. private Upload: angular.angularFileUpload.IUploadService,
then the config object needs to be typed as angular.angularFileUpload.IFileUploadConfigFile and that does not have a file property.
Injecting the service as any and then just using the examples in JS works, but for me it's not clear how we can do this in a properly typed way.
@stombeur Yes. I just use the upload service as "any" also.
I agree... would it be possible to see an actual example of a typescript controller having this service injected into it? Even injecting the service as "any" seems to fail the provider.
For version 2 all the code is in TypeScript and I will eventually port it back to Angular 1 to be able to use the same code base. So there is the plan to have the code in TypeScript.
@andersnorgaard can you show how you used it in typescript. It will be very helpful for me and many others like me.
I am also trying to implement the lib in a running TypeScript project and it's very difficult with no examples, it would be nice if somebody already implemented it and could share how to do it.
Hi I am using angular 1.5 and typescript, is there an example anywhere on how this is implemented using typescript yet? Many Thanks
Hi, I couldn't find an example using TS. Is there any? I've already installed the typings
typings install dt~ng-file-upload --save --global -SG
but I can't find the example on how it's used.Any ideas?
Thanks!