Angular PhotoSwipe Live Demo
AngularJS directive for PhotoSwipe.
Copyright © 2015, Massimiliano Sartoretto
You can choose your preferred method of installation:
- Through bower:
bower install ng-photoswipe --save
- Through npm:
npm install ng-photoswipe --save
- Download from github: angular-photoswipe.min.js
Inject ngPhotoswipe
module in your application with:
angular
.module('myApp', ['ngPhotoswipe'])
and use the directive as below:
<ng-photoswipe
slides="slides"
start-on="{{ bindToSomething || 'eventName' }}"
template="'template.html'"
options="opts">
</ng-photoswipe>
where slides
is an object describing the images and options
is an object for the configuration.
The start-on
attribute tells the directive to listen for the specified event to start the gallery.
(Helpful to start Photoswipe with a external event).
You can also provide your own template
that will override the default one.
(For further infos follow the Official docs)
- Add ngTemplates grunt task
- Fix npm package version
- Add custom event to manually start Photoswipe
- Better demo
- Better grunt build
- Add template attribute to override the default html template
- Fix DI bug due to undefined controller
- Improve jshint rules
- Update bower configuration
- Move link definition inside directive block
- Update demoApp
- Better code style
- Add JP's jshint
- External template compilation
- Add directive template
- Add ngPhotoswipeProvider