@fabiomirandadev/ngx-image-viewer
v1.0.2
Published
<section> <p>This component uses the <a href="http://ignitersworld.com/lab/imageViewer.html">Image Viewer JS</a> in it's core.</p> <p>Ngx-Image Viewer uses MIT license, so you can use it as you wish, feel free to help contributing with the code.</
Downloads
5
Maintainers
Readme
Welcome to Ngx-Image Viewer
Installation
To install this library, run:
$ npm install iv-viewer --save
$ npm install ngx-image-viewer --save
Consuming the library
And then from your Angular AppModule
:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// Import your library
import { ImageViewerModule } from 'ngx-image-viewer';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
// Specify your library as an import
ImageViewerModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Now just add the these codes on your angular-cli.json file:
"styles": [
"../node_modules/ngx-image-viewer/imageviewer.scss"
],
Once your library is imported, you can use its components, directives and pipes in your Angular application:
<!-- You can now use your library component in app.component.html -->
<h1>
Image Viewer
</h1>
<app-image-viewer [images]="['iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==', 'https://picsum.photos/900/500/?random']"
[idContainer]="'idOnHTML'"
[loadOnInit]="true"></app-image-viewer>
Changelog
Development
To generate all *.js
, *.d.ts
and *.metadata.json
files:
$ npm run build
To lint all *.ts
files:
$ npm run lint
This library is a fork of ng2-image-viewer
License
MIT © fabiomirandaa