3

I am having some trouble getting the popover element to work in an angular app using ui.bootstrap - here is some code:

in the app.js file, I am requiring ui.bootstrap

angular.module('developerPortalApp', [
    'ui.bootstrap'
  ])

The html element I am trying to attach a popover to

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

The popover content isn't going to be dynamic so there isn't anything in the controller for that. This is my first time using angular-bootstrap, so, is there something simple that I'm missing?

Any help is very much appreciated.

1
  • I should also add that ui-bootstrap-tpls.js is being loaded with the page Commented Feb 4, 2015 at 19:15

1 Answer 1

4

May be you are missing some script file:-

Here is working example of your question:-

<!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>

http://plnkr.co/edit/E2LbaCoHKHKzifeL5Hny?p=preview

Sign up to request clarification or add additional context in comments.

6 Comments

Well, admittedly I'm at somewhat of a loss. I seem to have things setup correctly according to this but it still isn't working. The only other difference I can think of is that the <a> tag I'm trying to place the popover on is contained within a jumbotron and a form, but I don't see how that would affect things :(
Can you make a plunker ?
I checked it with jumbotron and form it is still working :-) plnkr.co/edit/E2LbaCoHKHKzifeL5Hny?p=preview
I did not test what I am about to say, but to confirm the popover working in plunker, you should be using uib version of popover. Bootstrap CSS uses just popover.
@user1889992, I, for one, had to remove uib- prefix to get it working on a yeoman scaffolded app. uib- prefix was introduced in 0.14.0 as documented here github.com/angular-ui/bootstrap/wiki/…
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.