Closed szyb closed 1 year ago
@mzoellner On the Angular 8 support: I see that you have a branch (https://github.com/TradeMe/ng-defer-load/tree/feature-angular-8-upgrade) where support is added. Are you planning on merging this any time soon?
Hi, sorry about the delay with this. I just pushed the latest version. This makes the package compatible with both Angular 8 and 9. We tested Ivy support in Angular 9 but not in Angular 8.
@szyb can you test it in your application and let us know if sth. does not work ?
Cheers
Hi,
Sorry for delay too. To be honest I changed priority for IVY rendering and I will back to this, when I want to upgrade to Angular 9. But I still have branch fro IVY testing and I bump there npm version to @trademe/ng-defer-load@^8.0.0. Unfortunately I have still this error. It is also possible, that I'm doing something wrong :) If this is working well for Angular 9, then it is fine for me to close this issue.
Uncaught ReferenceError: Directive is not defined
at vendor-es2015.js:117166
at Object../node_modules/@trademe/ng-defer-load/__ivy_ngcc__/dist/defer-load.directive.js (vendor-es2015.js:117181)
at __webpack_require__ (runtime-es2015.js:80)
at Object../node_modules/@trademe/ng-defer-load/__ivy_ngcc__/dist/defer-load.module.js (vendor-es2015.js:117201)
at __webpack_require__ (runtime-es2015.js:80)
at Object../node_modules/@trademe/ng-defer-load/__ivy_ngcc__/dist/index.js (vendor-es2015.js:117238)
at __webpack_require__ (runtime-es2015.js:80)
at Module../src/app/app.module.ts (main-es2015.js:603)
at __webpack_require__ (runtime-es2015.js:80)
at Module../src/main.ts (main-es2015.js:2540)
Hi @szyb, I have pushed a couple of updates to this library to npm. Can you try the latest version with your IVY branch and let me know if it works. We are in the progress of upgrading to ng9, so we might run into similar issues soon, but keen to see if it resolved your problem.
Hi,
I use 8.2.1 version and now I have compilation error:
ERROR in No suitable injection token for parameter '_element' of class 'DeferLoadDirective'. no type or decorator
Probably it is related to my build env, because when I back to 8.0.0 version I've got the same error and it was compiling well before (there was only runtime error). Any thoughts?
Hi, upon a simple installation and import into app.module.ts, following error occurred:
ERROR in node_modules/@trademe/ng-defer-load/defer-load.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.
This likely means that the library (@trademe/ng-defer-load) which declares DeferLoadModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
I assume it's relevant to this post so I'll leave it here instead of making a new post.
We currently run with Angular 10 and Ivy, so I assume Angular 8 + Ivy is where the problem lies.
@NickGeek Nevermind, after restarting the dev server the error disappeared.
So we haven't had any issues yet with the newest version (8.2.1) however we get the following warning in Angular 13 with ivy about how ng-defer-load is not compiled with Ivy. I'm worried, due to Angular's current road map, that they may deprecate usability in future versions and it may cause problems.
Lately I've upgraded my project to latest angular 8.2.14. Despite of warning during
npm install
, defer-load is working well. But, when I enable IVY engine it fails during loading applicationIt would be great to make it work with IVY