code: function(trigger){
          var triggerId;
          if(trigger)
              triggerId = trigger.getAttribute('id');
           var allPopovers = trigger != undefined ? document.querySelectorAll('.ng-popover:not([trigger="'+triggerId+'"])') : document.querySelectorAll('.ng-popover');
          for(var i =0; i<allPopovers.length; i++){
              var popover = allPopovers[i];
              if(!popover.classList.contains('hide'))
                  popover.classList.add('hide')
          }
      }
docs: Hides all popovers, skips the popover whose trigger Id is provided in the function call