wittlock/ngx-image-zoom

'ngx-image-zoom' is not a known element

Closed this issue · 2 comments

i was trying to use this lib but i got thi error:

error

Error: src/app/cms-components/product/product-images/product-images.component.html:4:3 - error NG8001: 'ngx-image-zoom' is not a known element:

  1. If 'ngx-image-zoom' is an Angular component, then verify that it is part of this module.
  2. If 'ngx-image-zoom' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

component.html

<ngx-image-zoom
[thumbImage]="myThumbnail"
[fullImage]="myFullresImage"
[magnification]="1"
[enableScrollZoom]="true"
[enableLens]="true"
[lensWidth]="200">

component.js

public myThumbnail="https://wittlock.github.io/ngx-image-zoom/assets/thumb.jpg";
public myFullresImage="https://wittlock.github.io/ngx-image-zoom/assets/fullres.jpg";

config:

"@angular/core": "^12.0.5",
"ngx-image-zoom": "^0.6.0",
....

use lib-ngx-image-zoom tag

Yeah, the tag changed names in version 0.5.0 to try and align with recommendations from Angular. So like AdrainAgui says, it's called lib-ngx-image-zoom now.