Gathering detailed insights and metrics for ng2-image-viewer-forked
Gathering detailed insights and metrics for ng2-image-viewer-forked
npm install ng2-image-viewer-forked
Typescript
Module System
Min. Node Version
Node Version
NPM Version
73.5
Supply Chain
99.4
Quality
74.6
Maintenance
100
Vulnerability
100
License
JavaScript (51.59%)
TypeScript (25.37%)
CSS (16.17%)
HTML (6.87%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
1,556
Last Day
1
Last Week
2
Last Month
9
Last Year
171
MIT License
31 Stars
79 Commits
60 Forks
5 Watchers
9 Branches
3 Contributors
Updated on Mar 01, 2024
Latest Version
2.0.0
Package Id
ng2-image-viewer-forked@2.0.0
Unpacked Size
105.26 kB
Size
21.20 kB
File Count
19
NPM Version
6.13.7
Node Version
13.8.0
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
100%
2
Compared to previous week
Last Month
-52.6%
9
Compared to previous month
Last Year
-36.7%
171
Compared to previous year
38
This component uses the Image Viewer JS in it's core.
Ng2-Image Viewer uses MIT license, so you can use it as you wish, feel free to help contributing with the code.
This component allows you to:
Take a look at this quick tutorial!
You can donate on my Patreon!
The component already have some input references:
Name | Type | Required | Default Value | Description |
idContainer | string | X | NULL | It is the id of the component on the HTML, this parameter allows you to inject as many components as you wish. |
images | BASE64/URL[] | NULL | It is the array containing the base64 data, the component differs the images and the PDF files, so don't worry. | |
defaultDownloadName | string | 'Image' | It is the default name used on the file to be downloaded, Ex: Image 1, Image 2 | |
rotate | boolean | true | It is the boolean that renders the rotate left and right buttons | |
resetZoom | boolean | true | It is the boolean that renders the resetZoom button | |
zoomInButton | boolean | true | It is the boolean that renders the Zoom In Button | |
zoomOutButton | boolean | true | It is the boolean that renders the Zoom Out Button | |
zoomInTooltipLabel | string | Zoom In | It is the tooltip value you want for the zoom in button | |
zoomOutTooltipLabel | string | Zoom Out | It is the tooltip value you want for the zoom out button | |
download | boolean | true | It is the boolean that renders the download button | |
fullscreen | boolean | true | It is the boolean that renders the fullscreen button | |
showOptions | boolean | true | It is the boolean that renders the options panel at the top right corner | |
showPDFOnlyOption | boolean | true | It is the boolean that renders the PDF only button | |
loadOnInit | boolean | false | It is the boolean that lets you choose if you want to load the component on the OnInit event or on the OnChanges event, It was created because i faced some trouble with the primeNG tab using the change event. | |
primaryColor | string | '#0176bd' | It is the background-color used on the footer and on the options panel | |
buttonsColor | string | 'white' | It is the color used on the buttons on the options panel | |
buttonsHover | string | '#333333' | It is the color used on the hover event, when the button receive the mouse pointer | |
enableTooltip | boolean | true | It is the boolean that renders the tooltips above the buttons | |
rotateRightTooltipLabel | string | 'Rotate right' | It is the tooltip value you want for the rotate right button | |
rotateLeftTooltipLabel | string | 'Rotate left' | It is the tooltip value you want for the rotate left button | |
resetZoomTooltipLabel | string | 'Reset zoom' | It is the tooltip value you want for the reset zoom button | |
fullscreenTooltipLabel | string | 'Fullscreen' | It is the tooltip value you want for the fullscreen button | |
downloadTooltipLabel | string | 'Download' | It is the tooltip value you want for the download button | |
showPDFOnlyLabel | string | 'Show only PDF' | It is the tooltip value you want for the show PDF only button | |
openInNewTabTooltipLabel | string | 'Open in new tab' | It is the tooltip value you want for the open in new tab button | |
onNext | EventEmitter | It is the event triggered when you change to next file, it emits the actual index of the array on the component | ||
onPrevious | EventEmitter | It is the event triggered when you change to previous file, it emits the actual index of the array on the component |
To install this library, run:
1$ npm install iv-viewer --save 2$ npm install ng2-image-viewer --save
And then from your Angular AppModule
:
1import { BrowserModule } from '@angular/platform-browser'; 2import { NgModule } from '@angular/core'; 3 4import { AppComponent } from './app.component'; 5 6// Import your library 7import { ImageViewerModule } from 'ng2-image-viewer'; 8 9@NgModule({ 10 declarations: [ 11 AppComponent 12 ], 13 imports: [ 14 BrowserModule, 15 16 // Specify your library as an import 17 ImageViewerModule 18 ], 19 providers: [], 20 bootstrap: [AppComponent] 21}) 22export class AppModule { }
Now just add the these codes on your angular-cli.json file:
1"styles": [ 2 "../node_modules/ng2-image-viewer/imageviewer.scss" 3],
Once your library is imported, you can use its components, directives and pipes in your Angular application:
1<!-- You can now use your library component in app.component.html --> 2<h1> 3 Image Viewer 4</h1> 5<app-image-viewer [images]="['iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==', 'https://picsum.photos/900/500/?random']" 6[idContainer]="'idOnHTML'" 7[loadOnInit]="true"></app-image-viewer>
To generate all *.js
, *.d.ts
and *.metadata.json
files:
1$ npm run build
To lint all *.ts
files:
1$ npm run lint
MIT © brenoprata10
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/21 approved changesets -- score normalized to 1
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
125 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-03-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More