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>
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With