0

I am working on angularjs website and want to avoid page refresh on click of popover.Using bootstrap UI popover,to display list of actions. Page reload for the very first click on popover.

My html file:

<button ng-click="openTemplate($event)" uib-popover-template="searchPopover" 
  popover-placement="left" type="button" class="btn btn-default" 
  popover-trigger="focus">Actions
</button>

My controller.js:

$scope.openTemplate=function(event){
    event.preventDefault();
}
Cláudio Alves
  • 767
  • 3
  • 12
Amit Anand
  • 103
  • 1
  • 3
  • 10

1 Answers1

0

The simplest solution would be to use an <a> tag, instead of <button>, without the href attribute.

DrinkBird
  • 834
  • 8
  • 17