带有AngularJS和输入的Bootstrap Popover

时间:2018-07-31 16:46:15

标签: angularjs twitter-bootstrap popover

<select ng-model="dropdownlist" ng-options="x.item as x.item for x in list | unique:'item'">
</select>

<a data-toggle="popover" data-title="Add New Item" data-container="body" type="button" data-html="true" href="#" id="AddNewItem">Add New</a>
<!-- This doesn't work -->
<div id="popover-content" class="hide">
  <input ng-model="addMe" placeholder="Item">
  <button ng-click="addItem()" class="btn btn-primary">Add</button>
</div>
<!-- But this does (just removed the popover div) -->
<input ng-model="addMe" placeholder="Item">
<button ng-click="addItem()" class="btn btn-primary">Add</button>

JSFIDDLE

我正在尝试使用角度从弹出式窗口中输入内容,将项目添加到下拉列表中。当我取出弹出式窗口时,它起作用了,但是不行。

0 个答案:

没有答案