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

Adding lightbox support for template instead of templateUrl. #88

Closed elribonazo closed 1 year ago

elribonazo commented 6 years ago

Hi all,

Got to the point were I had to make few changes into the library:

  1. Loading the html templates every time the Lightbox gets loaded.
  2. Leaking the source of the html's just by reading the connecting in the network inspector.
  3. Using JST (lodash templates) by creating a global JST method with all the html compiled inside.

The project now runs much smoother, and I wanted to share my changes with all. I basically added support for the lightbox to use template || templateUrl.

If template is used during the Lightbox initialization it will attempt to load the html itself, if not a GET request will be made in order to get the html template.

The change is pretty simple and easy to understand, hope somebody thinks its usefull. I hope it can be merged, but if not I'll keep using my fork version.

Best regards!