import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload';
to
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload/ng2-file-upload';
So, yes - it is supported!
How did you get it to work on 2.0.0? I get the following error, even though paths are correct:

This happened as soon as I updated. It was working on prior versions.
**Edit**: I just had another crack at this, and got it working. I had to change my system.config.js to the following:
```
map: {
ng2-file-upload': 'npm:ng2-file-upload'
},
packages: {
...
'ng2-file-upload': {
defaultExtension: 'js'
}
}`
```
and change my imports from:
`import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload';`
to
`import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload/ng2-file-upload';`
So, **yes - it is supported!**
no is still get this error
`Unhandled Promise rejection:
Template parse errors:
Can't bind to 'uploader' since it isn't a known property of 'input'. (" document...
```
<input class="thumb hide-document-button" type="file" ng2FileSelect [ERROR ->][uploader]="uploader" />
</div>`
```
In your config.js you don't seem to be importing ng2-file-upload?
Also your app.ts will need to import FormsModule and ReactiveFormsModule as follows in this example:
In your config.js you don't seem to be importing ng2-file-upload?
Also your app.ts will need to import FormsModule and ReactiveFormsModule as follows in this example:
```
import {BrowserModule} from '@angular/platform-browser';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
@NgModule({
imports: [ BrowserModule, FormsModule, ReactiveFormsModule,],
declarations: [ AppComponent],
bootstrap: [ AppComponent ],
providers: [ ]
})
export class AppModule { }
```
Give those few things a go?
@hiddeb @Davy-F do you achieve this plnkr ? have you a valid plnkr for this component ng2-file-upload because my is still broken http://plnkr.co/edit/mjMCKvFV1m2tch2BxSl6?p=preview
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
is this compatible with angular 2.0 that was just officially released?
Works well in my project. Project uses angular@2.0.0.
How did you get it to work on 2.0.0? I get the following error, even though paths are correct:
This happened as soon as I updated. It was working on prior versions.
Edit: I just had another crack at this, and got it working. I had to change my system.config.js to the following:
and change my imports from:
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload';to
import {FILE_UPLOAD_DIRECTIVES, FileUploader} from 'ng2-file-upload/ng2-file-upload';So, yes - it is supported!
can you show the code of the component and template?
I get the error uploader isn't a type of input
Hope this helps.
HTML Template:
Component (extracted only the relevant code):
Thanks @Davy-F
No problem, @hiddeb. Did you get it all working?
no is still get this error
`Unhandled Promise rejection:
Template parse errors:
Can't bind to 'uploader' since it isn't a known property of 'input'. (" document...
In your App,Module are you importing both FormsModule and ReactiveFormsModule?
yes FormsModule and ReactiveFormsModule are imported, but i still get the error
Hmm, could you post your code?
It seems valor are readying a new release rather soon so it might be worth holding out and trying that first.
Html template:
`
<div class="thumb document-border document-border-{{ document.status }}" *ngIf="document.file" [ngStyle]="{'background-image': 'url(' + document.file + ')'}">
Component:
`import {Component, OnInit, Input } from '@angular/core';
import { FileUploader, FileUploaderOptions } from 'ng2-file-upload/ng2-file-upload';
import { Document } from '../model/document';
@Component({
selector: 'kp-document',
templateUrl: 'app/document/document.component.html'
})
export class DocumentComponent implements OnInit {
@Input()
document: Document;
}`
Can you please assemble sample plunker or repo?
So I can fix it fast?
this is the plunker link: https://plnkr.co/edit/IcX2bS8VnasZHPIeNd9B
but i cant get it to work there
In your config.js you don't seem to be importing ng2-file-upload?
Also your app.ts will need to import FormsModule and ReactiveFormsModule as follows in this example:
Give those few things a go?
i get a different error,plunkr cant find document.ts.
But this is how we use it in our project
@hiddeb @Davy-F do you achieve this plnkr ? have you a valid plnkr for this component ng2-file-upload because my is still broken http://plnkr.co/edit/mjMCKvFV1m2tch2BxSl6?p=preview
did anyone get it working with angular2
I am getting error
Unexpected value 'FileUploader' imported by the module 'AppModule'