Compatability with Ivy #1151

Open
opened 2020-05-13 13:31:34 +00:00 by JohnTranstel · 14 comments
JohnTranstel commented 2020-05-13 13:31:34 +00:00 (Migrated from github.com)

Trying to use 1.4.0 with angular 9
It does not like FileSelectDirective in the declaration or import sections of app.module.
removing it then re-raises the issue
Can't bind to 'uploader' since it isn't a known property of 'input'

Error message wonders if ng2-file-upload is compatible with Ivy

Is it?

Trying to use 1.4.0 with angular 9 It does not like FileSelectDirective in the declaration or import sections of app.module. removing it then re-raises the issue Can't bind to 'uploader' since it isn't a known property of 'input' Error message wonders if ng2-file-upload is compatible with Ivy Is it?
ewwwgiddings commented 2020-05-17 03:17:07 +00:00 (Migrated from github.com)

I'm having the same issue with:

ERROR in ../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS- 
996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an 
NgModule class

1 export declare class FileUploadModule {

Does version 1.4 solve the Ivy errors? I'm using 1.3...

I'm having the same issue with: ERROR in ../node_modules/ng2-file-upload/file-upload/file-upload.module.d.ts:1:22 - error TS- 996002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class 1 export declare class FileUploadModule { Does version 1.4 solve the Ivy errors? I'm using 1.3...
ewwwgiddings commented 2020-05-17 03:23:37 +00:00 (Migrated from github.com)

I see there's an Ivy folder in version 1.3 but again I get this error which is an error mentioned here:
2888f4cb11

Anyone know how to get version 1.3.0 compatible with Ivy?

I see there's an Ivy folder in version 1.3 but again I get this error which is an error mentioned here: https://github.com/valor-software/ng2-file-upload/commit/2888f4cb1154cba8572de891c9511b021a453737 Anyone know how to get version 1.3.0 compatible with Ivy?
wcpmahmudul commented 2020-05-18 22:41:14 +00:00 (Migrated from github.com)

Having same issue with Angular 9. Does anyone find any solution to this?

Having same issue with Angular 9. Does anyone find any solution to this?
ewwwgiddings commented 2020-05-23 17:51:22 +00:00 (Migrated from github.com)

Is this repo maintained by Valor or is it up to the community to fix issues like this?

Is this repo maintained by Valor or is it up to the community to fix issues like this?
rhuitl commented 2020-05-25 08:39:54 +00:00 (Migrated from github.com)

See also #1145, it looks like Valor made this project internal-only. There is a version 1.4.0 on NPM, but the code for it is not in this Github repository and the MIT license has been removed.

See also #1145, it looks like Valor made this project internal-only. There is a version 1.4.0 on NPM, but the code for it is not in this Github repository and the MIT license has been removed.
ewwwgiddings commented 2020-05-25 18:27:41 +00:00 (Migrated from github.com)

Looks like they just left the README off the update.

It looks like version 1.4.0 isn't compatible with Angular 9 Ivy? Has anyone got it to work?

The latest commit here by @Domainv mentions update to Angular 8 in the description.

@rhuitl There's 70k weekly downloads from their npm. Would be surprised if they changed the licensing on that many people.

Looks like they just left the README off the update. It looks like version 1.4.0 isn't compatible with Angular 9 Ivy? Has anyone got it to work? The latest commit here by @Domainv mentions update to Angular 8 in the description. @rhuitl There's 70k weekly downloads from their npm. Would be surprised if they changed the licensing on that many people.
slcoder commented 2020-07-28 20:23:43 +00:00 (Migrated from github.com)

Looks like they just left the README off the update.

It looks like version 1.4.0 isn't compatible with Angular 9 Ivy? Has anyone got it to work?

The latest commit here by @Domainv mentions update to Angular 8 in the description.

@rhuitl There's 70k weekly downloads from their npm. Would be surprised if they changed the licensing on that many people.

Still 1.4.0 does not work with angular 9.1, any update, please?

> Looks like they just left the README off the update. > > It looks like version 1.4.0 isn't compatible with Angular 9 Ivy? Has anyone got it to work? > > The latest commit here by @Domainv mentions update to Angular 8 in the description. > > @rhuitl There's 70k weekly downloads from their npm. Would be surprised if they changed the licensing on that many people. Still 1.4.0 does not work with angular 9.1, any update, please?
crowmagnumb commented 2020-09-29 00:33:13 +00:00 (Migrated from github.com)

I just did a giant switch to angular 10 and now this, a fairly core piece of my system, does not work. Help! At least give us access to to the 1.4.0 source code so that we can try and fix it ourselves! Please, give us something to go on here.

I just did a giant switch to angular 10 and now this, a fairly core piece of my system, does not work. Help! At least give us access to to the 1.4.0 source code so that we can try and fix it ourselves! Please, give us something to go on here.
ewwwgiddings commented 2020-09-29 00:49:19 +00:00 (Migrated from github.com)

I just did a giant switch to angular 10 and now this, a fairly core piece of my system, does not work. Help! At least give us access to to the 1.4.0 source code so that we can try and fix it ourselves! Please, give us something to go on here.

So you're in 10 with version 1.4 from npm and it doesn't work? Seeing some people say it works while others not...

> I just did a giant switch to angular 10 and now this, a fairly core piece of my system, does not work. Help! At least give us access to to the 1.4.0 source code so that we can try and fix it ourselves! Please, give us something to go on here. So you're in 10 with version 1.4 from npm and it doesn't work? Seeing some people say it works while others not...
crowmagnumb commented 2020-09-29 02:00:15 +00:00 (Migrated from github.com)

Oh gosh. I'm sorry. It was just a Firefox issue. It just won't respond to opening the file dialog with a click. It works fine in Chrome now I see. I've been having a lot of similar problems with my Firefox install lately so hopefully its just something on my end there. Sorry, I'm tired and need dinner, and I had the one problem, saw the thread here about it not working in Ivy and I panicked. :) Should have been more thorough.

Oh gosh. I'm sorry. It was just a Firefox issue. It just won't respond to opening the file dialog with a click. It works fine in Chrome now I see. I've been having a lot of similar problems with my Firefox install lately so hopefully its just something on my end there. Sorry, I'm tired and need dinner, and I had the one problem, saw the thread here about it not working in Ivy and I panicked. :) Should have been more thorough.
abdatta commented 2020-09-29 14:21:48 +00:00 (Migrated from github.com)

I'm currently in the process of upgrading one of my projects to Angular 10, and I just came here to make sure all my libraries are Ivy compatible or not. So is it compatible? Does it work with Angular 10? If not, is there any fork of this that works with Angular 10?

I'm currently in the process of upgrading one of my projects to Angular 10, and I just came here to make sure all my libraries are Ivy compatible or not. So is it compatible? Does it work with Angular 10? If not, is there any fork of this that works with Angular 10?
crowmagnumb commented 2020-09-29 16:33:50 +00:00 (Migrated from github.com)

For me, while I have not done extensive testing in any way shape or form, it appears to be, at least basically, working. I would of course make an upgrade branch to test before diving in deep.

For me, while I have not done extensive testing in any way shape or form, it appears to be, at least basically, working. I would of course make an upgrade branch to test before diving in deep.
Prinsn commented 2021-04-14 16:46:56 +00:00 (Migrated from github.com)

I haven't tried upversioning to 1.4, but 1.3 I managed to get it to work by just componentizing the uploader

                        <div ng2FileDrop
                             [ngClass]="{'nv-file-over': hasBaseDropZoneOver && baseDropZoneOverId == type.id}"
                             (fileOver)="fileOverBase($event, this.m.id)"
                             [uploader]="uploader">
                            <div>
                                <button class="btn btn-success" id="select_{{this.m.id}}" (click)="fileInput.click()" [class.btn-disabled-grey]="disableBtnSelect(m.id)" [disabled]="disableBtnSelect(m.id)">
                                    Select
                                </button>
                                <span class="hide-uploader-input">
                                    <input type="file" id="uploaderInput_{{this.m.id}}" #fileInput ng2FileSelect (change)="onFileChanged($event, m.id)" [uploader]="fileService.uploader" class="hide-uploader-input" />
                                </span>
                            </div>
                        </div>
//Controller added code
    uploader: any;
    hasBaseDropZoneOver: any;
    baseDropZoneOverId: any;
    type: any;
    fileOverBase: any;

And it seems to work in all ways as I would expect for Angular 9. I haven't done extensive testing, but it was basically a super naive hack solution for the compiler error in migration where those 5 "directive" properties were not known by Ivy. I don't know if this causes weird issues with having multiple uploaders or not, but the happy path test worked perfectly fine.

I haven't tried upversioning to 1.4, but 1.3 I managed to get it to work by just componentizing the uploader ```html <div ng2FileDrop [ngClass]="{'nv-file-over': hasBaseDropZoneOver && baseDropZoneOverId == type.id}" (fileOver)="fileOverBase($event, this.m.id)" [uploader]="uploader"> <div> <button class="btn btn-success" id="select_{{this.m.id}}" (click)="fileInput.click()" [class.btn-disabled-grey]="disableBtnSelect(m.id)" [disabled]="disableBtnSelect(m.id)"> Select </button> <span class="hide-uploader-input"> <input type="file" id="uploaderInput_{{this.m.id}}" #fileInput ng2FileSelect (change)="onFileChanged($event, m.id)" [uploader]="fileService.uploader" class="hide-uploader-input" /> </span> </div> </div> ``` ```ts //Controller added code uploader: any; hasBaseDropZoneOver: any; baseDropZoneOverId: any; type: any; fileOverBase: any; ``` And it seems to work in all ways as I would expect for Angular 9. I haven't done extensive testing, but it was basically a super naive hack solution for the compiler error in migration where those 5 "directive" properties were not known by Ivy. I don't know if this causes weird issues with having multiple uploaders or not, but the happy path test worked perfectly fine.
tonyblazesage commented 2022-10-29 15:28:09 +00:00 (Migrated from github.com)

I encountered this same error. I am using angular 13 with a shared module containing most of my modules. when i tried importing and adding it to this module. i encountered the error. I tried doing it in the app.module.ts and the error simply went away.

i hope this helps...###

this worked for me.

I encountered this same error. I am using angular 13 with a shared module containing most of my modules. when i tried importing and adding it to this module. i encountered the error. I tried doing it in the app.module.ts and the error simply went away. i hope this helps...### this worked for me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dc/ng2-file-upload#1151