Installation
Available Services
The Angular adapter exports four injectable services that correspond to different zoom behaviors:ZoomImageWheelService- Zoom with mouse wheelZoomImageHoverService- Zoom on hover with separate zoom targetZoomImageMoveService- Zoom on mouse moveZoomImageClickService- Zoom on click
ZoomImageWheelService
Enables zooming with mouse wheel/trackpad scrolling.API
State
Example
ZoomImageHoverService
Displays a zoomed version in a separate container when hovering over the image.API
State
Example
ZoomImageMoveService
Zooms the image as the mouse moves over it.API
State
Example
ZoomImageClickService
Toggles zoom when clicking on the image.API
State
Example
Cleanup
All services implementOnDestroy and automatically clean up when the component is destroyed. The cleanup removes event listeners and frees resources.
Dependency Injection
All services must be provided in your component’sproviders array:
TypeScript Support
The Angular adapter is written in TypeScript and provides full type definitions. Import types from@zoom-image/core:
Related
- createZoomImageWheel - Core wheel zoom function
- createZoomImageHover - Core hover zoom function
- createZoomImageMove - Core move zoom function
- createZoomImageClick - Core click zoom function
- React Adapter - React implementation
- Vue Adapter - Vue implementation