mh-gallery
v1.1.7
Published
## Installation
Downloads
5
Maintainers
Readme
mh-gallery
Installation
To install this library, run:
$ npm install mh-gallery --save
Responsive image gallery designed for high resolution images.
This project contains a gallery of images with a professional design and easy handling. There will be no problem in dealing with the data format.
Where you can send data in two most common formats either array of string or array of object
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 { MHGalleryModule } from 'mh-gallery';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
MHGalleryModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
images=[
{photo:"photo url",description:'your description'},
{photo:"photo url",description:'your description'},
{photo:"photo url",description:'your description'},
{photo:"photo url",description:'your description'},
{photo:"photo url",description:'your description'},
{photo:"photo url",description:'your description'}]
or with out description
images=[
"photo url",
"photo url",
"photo url",
"photo url",
"photo url",
"photo url",
]
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 -->
<mh-gallery [datasource]="images" [index]="'photo'"></mh-gallery>
<mh-gallery [datasource]="images" ></mh-gallery>
Options
| Options | Type| Usage | | ------ | ------ | ------| | datasource | Array | Images Array | index (Optional) | String| when use array of object must select the key of image | pageSize (Optional) | number| size of image per page default 25
License
MIT © mohammadhmead