Hide Angular UI Bootstrap popover when clicking outside of it

后端 未结 12 2134
野趣味
野趣味 2020-11-30 07:37

I am trying to manually close a bootstrap popover to get it to close when I click anywhere on the document or body that isn\'t the popover.

12条回答
  •  时光取名叫无心
    2020-11-30 07:41

    popover-trigger="'outsideClick'" This will work perfectly.

    popover-trigger="outsideClick" This will not.

    I took 1 day to sort it out why it was not working for me.

    It is because they checking this using this code, "if (trigger === 'outsideClick')"

提交回复
热议问题