Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

theInspiredOnes/angularbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angularbox

A lightbox module for AngularJS. The module has no external dependencies besides Angular itself. No jQuery required. So far, it only supports displaying images in a lightbox. Check out the example here.

Usage

Just include Angular and the angularbox.min.js in your page and add this at the very bottom just before the closing </body> tag:

<div data-angularbox="angularbox"></div>

Make sure to add 'angularbox' to your Angular-app's dependencies or use it as standalone-app by adding the ng-app="angularbox" attribute to an element surrounding the image thumbnails.

Links to images that should open in a lightbox are referenced like this:

<a href="http://lorempixel.com/1000/500/people/1" class="angularbox" title="Title goes here">
  <img src="http://lorempixel.com/200/100/people/1" alt="Foo">
</a>

Different galleries can be created by adding a rel="mygalleryname" to the <a> tag.

Controls

To scroll through the images of the same gallery you can use the and buttons or the left and right arrow keys respectively. To close the lightbox press the × button, the escape key or click anywhere on the lightbox background.

##Known Issues

  • Zooming behaviour on mobile devices.

##Contribute

You need to have grunt and bower installed in order to build the code. Grunt is preconfigured with CoffeeScript and LESS compiling. Just run npm install and then grunt or grunt watch in the root directory of this repository.

About

A lightbox module for AngularJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published