Utilizing the Bootstrap popover feature from https://angular-ui.github.io/bootstrap/ for my project, I have created a directive like this:
<button popover-template="dynamicPopover.templateUrl" popover-title="{{dynamicPopover.title}}" type="button" class="btn btn-default">Popover With Template</button>
. In order to make the popover display on the visible screen responsively, I had to customize the positioning function of Bootstrap.
To address this customization, I developed a function called
scope.getPopoverOnPosition = function {....}
, where I set a variable called scope.Position.
Within the template, I use:
"<button popover-template="dynamicPopover.templateUrl" popover-title="{{dynamicPopover.title}}" type="button" popover-placement='{{position}}' class="btn btn-default">Popover With Template</button>"
(specifying the direction sets an arrow pointed to the button relatively and also determines the top and left positions of the popover). However, I'm encountering an issue where the popover initially opens without a direction, blinks once, and then displays correctly.
My assumption is that the function is being called after the template initialization, causing a delay in reflecting the changes. Is there a way to achieve this functionality smoothly without any glitches?