Closed kKen94 closed 5 years ago
https://github.com/angular/angular/issues/31990 here there is opposite error. I Don't know if it is an angular or library issue
hmm, I know that the library works fine with Angular 7 and Angular 8 with Ivy. I'll try with Angular 8 ... But Angular 8 has a lot of bugs ...
😂😂😂 I know
It should be okay with the version 8.0.3. There is a example here. I use Angular 8.2 ...
Can you confirm ?
I also use angular 8.2 It is probably an angular error
Are you tested my last release (8.0.3) ? I've no more error with or without ivy.
I do it now and the error is
This the declaration:
And this the usage:
I saw the repo, i can't found the reason of the error. I'm seeing that you have uploaded a new version, i'll try it
Hi @kKen94 , Have you resolved your problem ?
I suppose we can close this issue. You can create a new issue whether your problem persists.
Sorry, I was on vacation.
It is my problem. I don't understand why, but the same code in a new project works, in this project no. 🤷🏻♂️
Have you tried with an application that use NgxUpload in a sub route? I explain myself:
I resolve this bug both importing NgxUploadModule.forRoot() in app.module and in my sub module.
Your sub module is lazy loaded ?
Yes. And with previous version it works
Normally, you have to import NgxUploadModule.forRoot()
in your AppModule and NgxUploadModule
in your sub module. I don't have to call forRoot
in a sub module. It's a convention lirectly linked to Angular.
You can take a look at this repo.
So why did it work with the old version?
NgxUpload v8 come with some changes (I use providedIn: 'root' now). So you may have a conflict with the providers. (If you use forRoot() in a sub module, yours services will not be singleton and the behavior is not predictive). Maybe , the new Angular's injector is less permissive ...
You guys need to update your docs, this error was driving me crazy. Other than that great work, great plugin, keep it up.
done
Hi!
I know, mantain angular8 with and without Ivy is an aweful work.
Now, with Ivy, library works like a charm.
But without Ivy this is the error in DI:
" Can't resolve all parameters for *Component in path: (?) "