1

I'm using the Angular Bootstrap Popover:

<button popover-placement="top" popover="On the Top!" class="btn btn-default">Top</button>

If using default Bootstrap JavaScript, it's possible to define the placement using a function.

How can this be done using Angular Bootstrap? I would like to switch from right to left on a mobile device. (width < 768 px).

4

1 回答 1

2

在控制器中定义一个变量“放置”用于放置。并将html代码更改为

<button popover-placement="{{placement}}" popover="On the Top!" class="btn btn-default">Top</button>

现在您可以根据条件更改控制器中工具提示的位置

于 2015-04-07T12:11:55.330 回答