Base solution for your next web application
Open Closed

uib-popover question #1289


User avatar
0
joe704la created

I saw you use the uib-popover directive from <a class="postlink" href="https://angular-ui.github.io/bootstrap/">https://angular-ui.github.io/bootstrap/</a> and got that working just fine. But I want to use HTMl in the popup. Bootstrap does have a uib-popover-html directive but it doesn't work with asp.net Zero. Are you using a customized version of angular UI bootstrap that doesn't include the uib-popover-html?


5 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    No, we are not using a customized version and it's pretty up-to-date. Can you share the code?

  • User Avatar
    0
    joe704la created

    Sure, I was trying to do something like below

    <td width="12.5%" ng-if="tar.day1 != null" class="yes-record">
                            <span class="label label-info" popover-title="Time Given: {{tar.time}}" uib-popover-html="Given By: {{tar.day1}}" popover-placement="top" popover-trigger="mouseenter click">Entries Exist</span>
                        </td>
    

    From what I was reading in the documentation at <a class="postlink" href="https://angular-ui.github.io/bootstrap/">https://angular-ui.github.io/bootstrap/</a> it seems like I am doing it correctly. But I must be missing something.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think it should be used like this

    uib-popover-html="tar.day1"
    

    {{tar.day1}} does not seem to work.

    In your case you need a prefix text, so you can use it like this.

    Define a function to return html in your controller.

    vm.getTimeHtml = function(day1){
       return 'Given By: ' + day1;
    }
    

    Then use it like this

    uib-popover-html="getTimeHtml(tar.day1)"
    
  • User Avatar
    0
    joe704la created

    Unfortunately, that did not work either.

  • User Avatar
    0
    ismcagdas created
    Support Team

    If it is not going to be a problem, can you share full versions of your controller and view ? Then we can look into it more deeply.