question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeScript example

See original GitHub issue

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!

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
stombeurcommented, Sep 21, 2016

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.

1reaction
apiwebcommented, Jun 15, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - TypeScript for JavaScript Programmers
TypeScript knows the JavaScript language and will generate types for you in many cases. For example in creating a variable and assigning it...
Read more >
Typescript example: Beginners Guide To ... - AppDividend
Typescript is a typed superset of Javascript that compiles to plain JavaScript. TypeScript is open source language maintained by Microsoft.
Read more >
TypeScript Tutorial: What is, Interface, Enum, Array with Example
In this TypeScript tutorial, you will learn What is TypeScript, TypeScript Arrays, Class, Interface, Functions, Enum, and Namespaces with ...
Read more >
TypeScript Tutorial - Tutorialspoint
TypeScript is pure object oriented with classes, interfaces and statically typed like C# or Java. The popular JavaScript framework Angular 2.0 is written...
Read more >
TypeScript tutorial with Visual Studio Code
Let's start with a simple Hello World Node.js example. Create a new folder HelloWorld and launch VS Code. mkdir HelloWorld cd HelloWorld ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found