Magnifying Glass Image In Angular

Installation

Run: to instal this library.

npm i ng-magnizoom

the Angular AppModule:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgMagnizoomModule } from 'ng-magnizoom';
@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, AppRoutingModule, NgMagnizoomModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

Use ng-magnizoom in your Angular application after importing the library:

<div class="main">
  <h4 class="text-center">Magnifying glass image in an angular</h4>
  <ng-magnizoom zoomMode="LENS" imageSrc="../../../assets/image-1.jpeg"></ng-magnizoom>
</div>
Output

 

 

 

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories