Search code examples
angularjsangular-ui-bootstrapangular-uipopover

angular-ui: Using popover-template


I posted an earlier question: angular-ui-bootstrap: Implementing html in popover using popover-html and it was suggested I use popover-template.

<i popover-template="popover-partial.html" popover-title="In Progress" class="glyphicon glyphicon-info-sign"></i>

<script type="text/ng-template" id="popover-partial.html">
    <b>Jody</b>
</script>

So I'm trying to do that but now the popover won't activate on click.

I'm using version 0.13.4.


Solution

  • popover-template value should be string, In other way you could say that, it needs an expression/scopeVariable.

    <i popover-template="'popover-partial.html'" 
      popover-title="In Progress" 
      class="glyphicon glyphicon-info-sign">
    </i>
    

    Demo