5.6.8 • Published 2 years ago

preview-gallery v5.6.8

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

PreviewGallery

This library was generated with Angular CLI version 13.1.0.

Description

Angular library for previewing photos before uploading.

Usage

copy this code to your project

app.component.html:

  <button preview-btn>Add image</button>
  <ngx-preview-gallery (images)="showImgs($event)"></ngx-preview-gallery>

app.component.ts:

  showImgs(imgs: Array<PreviewImage>)) {
    imgs.forEach(img => {
      console.log(img.path)
    })
  }

Steps

  1. npm i preview-gallery
  2. Import module "PreviewGalleryModule" into the "app.module"
@NgModule({
  ...
  imports: [
    PreviewGalleryModule,
  ]
})
  1. Add directive "preview-btn" to your button
  <button preview-btn>Add image</button>
  1. Place tag "ngx-preview-gallery", where you want to see the preview panel
  <button preview-btn>Add image</button>
  <ngx-preview-gallery></ngx-preview-gallery>
  1. click on button and choose an image

  2. finally you can get your images by listening to the "images" event

app.component.html:

  <button preview-btn>Add image</button>
  <ngx-preview-gallery (images)="showImgs($event)"></ngx-preview-gallery>

app.component.ts:

  showImgs(imgs: Array<PreviewImage>)) {
    imgs.forEach(img => {
      console.log(img.path)
    })
  }
5.6.8

2 years ago

5.6.7

2 years ago

5.6.6

2 years ago

5.7.5

2 years ago

5.6.5

2 years ago

5.5.5

2 years ago

5.5.4

2 years ago

4.5.4

2 years ago

4.4.4

2 years ago

4.3.4

2 years ago

4.2.4

2 years ago

3.2.4

2 years ago

3.1.4

2 years ago

3.1.3

2 years ago

3.0.3

2 years ago

3.0.2

2 years ago

3.0.1

2 years ago

1.0.1

2 years ago

0.0.1

2 years ago