when I'm trying to install "npm install ng2-file-upload --save" in my angular 4 application it throws
UNMET PEER DEPENDENCY @4.1.0
UNMET PEER DEPENDENCY @4.1.0
`-- [email protected]
and upload is not working my applications throws
"Can't bind to 'uploader' since it isn't a known property of 'input'"
this is my HTML
<input type="file" ng2FileSelect [uploader]="upload" multiple formControlName="file" id="file"/>
and its Component
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
import { FileSelectDirective, FileUploader } from 'ng2-file-upload/ng2-file-
upload';
export class PersonalInfoComponent implements OnInit
{
public upload:FileUploader= new FileUploader({url:""});
}
Parent Module
import { FileUploadModule } from 'ng2-file-upload/ng2-file-upload';
@NgModule({
imports: [
..
....
..
FileUploadModule
],
export class RegistrationModule { }
and I didn't Import/change anything in AppModule(Grand Parent Module).
can someone help me on this please...
Upload images in Angular 4 without a plugin This is the article that might be worth trying. Upload images in Angular 4 without a plugin
It emphasize on these points: