Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 角度用户界面弹出内容_Javascript_Html_Angularjs_Angular Ui_Angular Ui Bootstrap - Fatal编程技术网

Javascript 角度用户界面弹出内容

Javascript 角度用户界面弹出内容,javascript,html,angularjs,angular-ui,angular-ui-bootstrap,Javascript,Html,Angularjs,Angular Ui,Angular Ui Bootstrap,我不熟悉angular UI,我使用弹出窗口(popover)作为复杂的菜单。但是我找不到一种方法来将html内容(如按钮、文本、图像)插入到popover中。这是我的html代码 <!doctype html> <html ng-app="ui.bootstrap.demo"> <head> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootst

我不熟悉angular UI,我使用弹出窗口(popover)作为复杂的菜单。但是我找不到一种方法来将html内容(如按钮、文本、图像)插入到popover中。这是我的html代码

    <!doctype html>
<html ng-app="ui.bootstrap.demo">
  <head>

    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>


    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.js"></script>
    <script src="https://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.13.2.js"></script>
    <script src="js/example.js"></script>
    <link href="//https:netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>


    <br><br><br><br>

<div ng-controller="PopoverDemoCtrl">
    <button popover-placement="bottom" Popover-animation="true" popover="I have a title!" popover-title="The title." class="btn btn-default">Click me</button>
</div>
  </body>
</html>

请告诉我如何添加html内容,并描述所使用的js函数。

使用弹出窗口的最简单方法是popover模板指令

<script id="myPopoverTemplate.html" type="text/ng-template">
//Insert detail here
    <div><button>Test</button></div>
    <hr />
</script>

//在此处插入详细信息
试验

html如下所示:

<button popover-placement="bottom" Popover-animation="true" popover="I have a title!" popover-title="The title." popover-template="myPopoverTemplate.html" class="btn btn-default">Click me</button>
点击我
这是我的第一次回答,对不起,斗争。 另外,我也不确定,我没有进行试运行

<button popover-placement="bottom" Popover-animation="true" popover="I have a title!" popover-title="The title." popover-template="myPopoverTemplate.html" class="btn btn-default">Click me</button>