Hide Angular UI Bootstrap popover when clicking outside of it

后端 未结 12 2137
野趣味
野趣味 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:59

    1) Use ng-bootstrap for Popover.

    2) Update the ng-bootstrap version to 3.0.0 or above. i.e npm install --save @ng-bootstrap/ng-bootstrap@3.0.0

    3) After updating, you may use [autoClose] functionality of Ngbpopover.

    
    

    4) Hope it helps !

提交回复
热议问题