1.0.2 • Published 7 years ago

ng2-image-hover-zoom v1.0.2

Weekly downloads
84
License
ISC
Repository
github
Last release
7 years ago

Angular 2 Image Zoom On Hover npm version npm monthly downloads

Angular2 component shows the Zoomed Image on Hover

semantic-release Dependency Status devDependency Status Known Vulnerabilities

Some of these APIs and Components are not final and are subject to change!

Installation

npm install ng2-image-hover-zoom --save

Usage

If you use SystemJS to load your files, you might have to update your config:

System.config({
    map: {
        'ng2-image-hover-zoom': 'node_modules/ng2-image-hover-zoom/bundles/index.umd.js'
    }
});

Examples

First, import the ImageZoom Module

import {ImageZoomModule} from 'ng2-image-hover-zoom';

Then, add ImageZoom to your modules import array

@NgModule({
    imports : [CommonModule, ImageZoomModule, ...],
})

Then just add the imageZoom tag to your img element

<img src="smallImageSrc" imageZoom="zoomedImageSrc">

License

MIT