leewinder / ng2-file-drop

An Angular module for simple desktop file drag and drop with automatic file validation and dynamic style adjustment.
MIT License
28 stars 26 forks source link

Angular 4 Support #18

Closed NColey closed 7 years ago

NColey commented 7 years ago

Hi @leewinder! My team has an application that is currently using ng2-file-drop that we are trying to upgrade to Angular 4 (v4.0.1 released March 29), unfortunately it looks like the most up to date version of ng2-file-drop still requires Angular 2.4.0 as a dependency which is leading to some unmet peer dependency issues for us. Is there a plan to upgrade ng2-file-drop to work with Angular 4? It may just be a matter of updating the dependencies but I'm not sure what is needed beyond that. Currently it's the only thing holding us back from upgrading so I would love to have an idea of if this is something in the works. Thanks so much!

microchip78 commented 7 years ago

Same issue for me too ... it is awesome plugin and used it happily while working on Angular2. But recently upgraded to Angular4 and peer dependency issue started ... It is much appreciated, if this get fixed ...

microchip78 commented 7 years ago

@NColey for intermediate solution ... If you are using AngularCLI, at your first compile with ng serve it will throw an error, but after compile if you edit any file in your app and it will automatically recompile without any error ... at least it will let you keep going till this issue fixed

NColey commented 7 years ago

Thanks @microchip78 , we aren't using AngularCLI, interestingly we can serve the app but there are a ton of console errors related to ng2-file-drop that prevent the page from loading that weren't there before the upgrade, seems to be treating the file drop component as an unknown property. Did you by any chance experience that?

NColey commented 7 years ago

@leewinder I started a PR that I think should update the dependencies but I'm not familiar enough with ng2-file-drop to know if there is more that would need to be updated to be compatible with Angular 4, and I'm also not entirely sure how to run your tests locally. Feel free to let me know what you think, I'm happy to update or change anything: https://github.com/leewinder/ng2-file-drop/pull/19