npm

Need private packages and team management tools?Check out npm Orgs. »

mh-gallery

1.1.7 • Public • Published

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

install

npm i mh-gallery

Downloadsweekly downloads

8

version

1.1.7

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability