Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ui-bootstrap popover-trigger expression breaks in version 2.0.0

In ui-bootstrap 1.3.3 I had a button with a popover and the following trigger

popover-trigger="click outsideClick"

The trigger opened the popover when I clicked the button and closed it when anything else was clicked

In ui-bootstrap 2.0.0 this popover trigger fails on

Error: $parse:syntax Syntax Error

Syntax Error: Token 'outsideClick' is an unexpected token at column 7 of the expression [click] starting at [{4}].

Trying both

popover-trigger="click" and popover-trigger="outsideClick" seems to work but it's not the behavior I require.

Going over their latest change-log I couldn't find any mention of this. How can I correct this?

like image 987
svarog Avatar asked Oct 14 '25 21:10

svarog


1 Answers

The docs say that popover-trigger accepts an expression but turns out it also accepts a string, all I had to do to properly concatenate the triggers was to apostrophe them in the expression

bad:

popover-trigger="click outsideClick"

good:

popover-trigger="'click outsideClick'"

And it all works again as it should

like image 81
svarog Avatar answered Oct 17 '25 13:10

svarog