檢查angular-ui-bootstrap
- 項目,特別是酥料餅的指令:
https://angular-ui.github.io/bootstrap/#/popover
您將需要添加的角度-UI-引導腳本的index.html,與常規的引導CSS一起 - 有一個CDN此:
https://cdnjs.com/libraries/angular-ui-bootstrap#
將上述2個腳本(min或unminified)和bootstrap.css文件index.html的後 - 你必須添加angul AR-UI-引導到您的應用程序初始化過程,如:
angular.module('myModule', ['ui.bootstrap']);
此時,您已經準備好使用酥料餅 - 例如在mousenter:
<button uib-popover="This popover appeared on mouse enter!"
popover-trigger="'mouseenter'"
type="button"
class="btn btn-default">Hover Over</button>
可以很明顯的讓這個充滿活力的 - 每您的要求 - 就像文檔中的示例:
<div class="form-group" ng-controller="MyController as vm">
<label>Popup Text:</label>
<input type="text"
ng-model="vm.popoverContent"
class="form-control"/>
<button uib-popover="{{vm.popoverContent}}"
popover-trigger="'mouseenter'"
type="button"
class="btn btn-default">Dynamic Hover Over</button>
</div>