I am trying to implement medium-zoom from [https://www.npmjs.com/package/medium-zoom][1]
These are the steps I followed
ng new medium_zoom_test
(Angular 13) with routing & cssnpm install medium-zoom
- image is kept in assets
app.component.html
<h1>Zoom test</h1>
<img class="zoomy" width="50%" src="assets/image.svg">
app.component.ts
import { Component } from '@angular/core';
import mediumZoom from 'medium-zoom';
mediumZoom('.zoomy', {
margin: 40,
background: '#ffffff',
scrollOffset: 40
})
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'medium_zoom_test';
}
When I serve the application I can see the page with image but I don’t see zoom icon. The image won’t zoom on click. It’s just a normal webpage with no change