Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular.ui.popover not working with latest angular 1.3.3 and angular.ui.bootstrap 0.12.0

I have created this pen:

http://codepen.io/anon/pen/vEOKEK

It works if I use angular 1.2.X, but dies as soon as I go to 1.3. I need the ability to use popover-template.

      <p>
    <button popover-placement="bottom" popover-template="calendar.html" class="btn btn-default">Date Picker</button>
  </p>

  <script id="calendar.html" type="text/ng-template">
    <div ng-model="date">
      <datepicker show-weeks="false"></datepicker>
    </div>
    <hr />
    <div class="alert alert-success">{{ text }}</div>
  </script>
like image 643
httpete Avatar asked Oct 20 '22 21:10

httpete


2 Answers

OK bottom line is - I spent HOURS trying to get angular.ui.popover to do this, but it just isn't engineered to allow custom html templates. I switched to nsPopover for angular, and I'm set. Much more flexible, better options. The tooltip / popover in angular.ui is only usable in the smallest use cases, ones so small I never see it.

like image 167
httpete Avatar answered Oct 22 '22 20:10

httpete


I'm not sure what angular-ui-bootstrap library you are using, but template support in the popover is not part of an official release, here is a link to the proposed pull request to add that feature. The popover documentation does not list popover-template as a supported attribute.

like image 33
Rob J Avatar answered Oct 22 '22 22:10

Rob J