Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/21.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
Angularjs angular ui.bootstrap不工作_Angularjs_Twitter Bootstrap - Fatal编程技术网

Angularjs angular ui.bootstrap不工作

Angularjs angular ui.bootstrap不工作,angularjs,twitter-bootstrap,Angularjs,Twitter Bootstrap,我在使用ui.bootstrap让popover元素在angular应用程序中工作时遇到一些问题-以下是一些代码: 在app.js文件中,我需要ui.bootstrap angular.module('developerPortalApp', [ 'ui.bootstrap' ]) 我正在尝试将popover附加到的html元素 <div ng-controller="LoginCtrl"> <a href="#" popover-placement="r

我在使用ui.bootstrap让popover元素在angular应用程序中工作时遇到一些问题-以下是一些代码:

在app.js文件中,我需要ui.bootstrap

angular.module('developerPortalApp', [
    'ui.bootstrap'
  ])
我正在尝试将popover附加到的html元素

<div ng-controller="LoginCtrl">
    <a href="#" popover-placement="right" popover="On the Right!">how do I register?</a>
</div>

popover内容不会是动态的,因此控制器中没有任何内容可用于此。这是我第一次使用角度引导,那么,有什么简单的东西我遗漏了吗


非常感谢您的帮助。

可能是您缺少一些脚本文件:-

以下是您的问题的工作示例:-

<!doctype html>
<html ng-app="ui.bootstrap.demo">
  <head>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
    <script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.12.0.js"></script>
    <script src="example.js"></script>
    <link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
  </head>
  <body>

<div ng-controller="LoginCtrl">
      <a href="#" popover-placement="right" popover="On the Right!">how do I register?</a>

</div>
  </body>
</html>


我还应该补充一点,ui-bootstrap-tpls.js正在加载pageWell,无可否认,我有点不知所措。我似乎有东西设置正确,根据这一点,但它仍然是不工作。我能想到的另一个区别是,我试图放置popover的标签包含在一个jumbotron和一个表单中,但我看不出这会对事情产生什么影响:(你能制作一个plunker吗?我用jumbotron检查了它,表单仍然有效:-)我没有测试我要说的内容,但要确认popover在plunker中工作,您应该使用uib版本的popover。Bootstrap CSS只使用了popover。@user1889992,我就是其中之一,必须删除uib-prefix才能在yeoman搭建的应用程序上工作。uib前缀是在0.14.0中引入的,如本文所述