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

Using Two Lightbox Templates #81

Open SDillon001 opened 7 years ago

SDillon001 commented 7 years ago

Thanks for putting this repo up, it's exactly what I was looking for! I've run into one issue though, I've added lightboxes on two different views and I'd like to specify two different templates. I've added

angular.module('app').config(function (LightboxProvider) {
  // set a custom template
  LightboxProvider.templateUrl = 'path/to/your-template.html';
});

in my two respective controllers with the appropriate paths to the two different lightbox template.html views, but both lightboxes are pulling from the same custom template? Any thoughts?

Here's a link to my issue branch timeline-modal-view

Any help is much appreciated. The biggest problem is that for some reason, while it's pulling the custom lightbox template from 'views/lightbox.html', it's not pulling the window resizer function LightboxProvider.calculateModalDimensions which is really unfortunate.

Thanks

SDillon001 commented 7 years ago

Looks like this was solved here: compact/angular-bootstrap-lightbox/issues/69