angular-bootstrap-lightbox icon indicating copy to clipboard operation
angular-bootstrap-lightbox copied to clipboard

naive assumption of default interpolateProvider

Open tommedema opened this issue 10 years ago • 2 comments

At https://github.com/compact/angular-bootstrap-lightbox/blob/master/src/lightbox.html it is assumed that the developer is using default interpolate start and end symbols. E.g. in ng-href="{{Lightbox.imageUrl}}"

However, many developer use different symbols for compatibility reasons (e.g. with server side templating engines).

There is a plunker to demonstrate this issue:

http://plnkr.co/edit/Rum0RqcqIsGNIvp6LQnS?p=preview

In demo1.js file you'll see commented lines 4,5 and 6 (the symbol interpolation we make for angular to prevent conflict with php syntax). If you remove the comment try to run it with interpolation of characters then it results in the same error I have in my code. This is due to the syntax symbols of the angular-bootstrap-lightbox.js library not being interpolated (e.g. lightbox modal html is with {{}} syntax).

Do you have any suggestions how to overcome this problem?

tommedema avatar Jun 23 '15 03:06 tommedema

I think the simplest solution is to create your own custom template with the correct symbols and use that template instead of the default.

Fork of your Plunker with an example: http://plnkr.co/edit/amZu2lhuQ5Y9jN9lthJJ?p=preview

compact avatar Jun 23 '15 03:06 compact

That makes sense, thanks.

There is no way to write plugin templates that do not assume a specific choice of symbols?

tommedema avatar Jun 23 '15 04:06 tommedema