Error while using ngx-image-zoom on Angular 14
davpirelli opened this issue · 3 comments
Hello, I have a problem with using the component. After installing, I get this error.
I'm not too much familiar with this kind of errors, any suggestion or help is appreciated.
Current config:
Angular CLI: 14.2.10
Node: 16.14.0
Package Manager: npm 6.14.17
OS: darwin arm64
Angular: 14.2.12
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router
Package Version
@angular-devkit/architect 0.1402.10
@angular-devkit/build-angular 14.2.10
@angular-devkit/core 14.2.10
@angular-devkit/schematics 14.2.10
@angular/cdk 14.2.6
@angular/cli 14.2.10
@nguniversal/builders 14.2.3
@nguniversal/express-engine 14.2.3
@schematics/angular 14.2.10
rxjs 7.5.5
typescript 4.6.3
I think this error comes from an incompatibility between your version of Angular and the version the library has been built for. You don't say what version of ngx-image-zoom you run, but assuming it is the latest version you could downgrade to 1.0.1 - the only change is updating to build for Angular 15 and a change to the behavior of toggle-freeze / hover-freeze modes. So if you don't use either of those running 1.0.1 should work just as well.
And then once you're up to Angular 15 you would hopefully no longer see this error on version 2.0 of this library.
I think this error comes from an incompatibility between your version of Angular and the version the library has been built for. You don't say what version of ngx-image-zoom you run, but assuming it is the latest version you could downgrade to 1.0.1 - the only change is updating to build for Angular 15 and a change to the behavior of toggle-freeze / hover-freeze modes. So if you don't use either of those running 1.0.1 should work just as well.
And then once you're up to Angular 15 you would hopefully no longer see this error on version 2.0 of this library.
Thanks for the quick reply! Downgrading works perfectly.
Closing it
Glad it was an easy fix. :)