0.0.3 • Published 5 years ago
@khalilof/simple-photo-gallery v0.0.3
Simple Photo Gallery
This library was generated with Angular CLI version 10.0.14.
Installation
npm install @khalilof/simple-photo-gallery --save
Usage
// app.module.ts
import { SimplePhotoGalleryModule } from '@khalilof/simple-photo-gallery';
...
@NgModule({
imports: [
...
SimplePhotoGalleryModule
...
],
...
})
export class AppModule { }
// app.component.ts
import { Component, OnInit } from '@angular/core';
import { GalleryImage } from '@khalilof/simple-photo-gallery';
...
@Component({
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit {
images: GalleryImage[];
ngOnInit(): void {
this.galleryImages = [
{
description: 'This is image 1 description',
label: 'first Image label',
image: 'image1URL.jpg',
},
{
description: 'This is image 2 description',
label: 'second Image label',
image: 'image2URL.jpg',
},
{
description: 'This is image 3 description',
label: 'third Image label',
image: 'image3URL.jpg',
},
];
}
}
// app.component.html
<kh-simple-photo-gallery [images]="images"></kh-simple-photo-gallery>