compact / angular-bootstrap-lightbox

An AngularJS lightbox built using UI Bootstrap Modal.
http://compact.github.io/angular-bootstrap-lightbox/
MIT License
306 stars 134 forks source link

Can I use any property name for image path? #3

Closed iyeldinov closed 10 years ago

iyeldinov commented 10 years ago

Not only 'url' that shown in the example?

compact commented 10 years ago

I'll make it customizable so that a method on the provider can be changed to return the image path in any way you want.

compact commented 10 years ago

With v0.3.0, you can now do it like this:

angular.module('app').config(function (LightboxProvider) {
  LightboxProvider.getImageUrl = function (image) {
    return image.otherPropertyName;
  };
});