1

I would like to use the Angular UI Bootstrap Popover.

The documentation states, that the trigger can be either mouseenter, click or focus. In my situation I would like to show the popover on a input-field if a back end calculation fails. How can I trigger the popover to show in code?

2

1 Answer 1

1

You can trigger the click event (or other based on your config) with $("#btn-id").click()

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

4 Comments

^ Except please don't use jquery $.
You can also trigger with angular way: angular.element('#btn-id').trigger('click');
It this really the best solution? Using this approach, the uses will dismiss the popover, when clicking the input field again, right?
The popup will be triggered with click event, so I think this is the most easy way.For ui-bootstrap, the popup div is generated when you click(or hover) the directive, so you can not control the popup div with something like ng-show.

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.