Hide ngx-popover only on mobile view

356 views Asked by At

I have a NgbPopover which works fine in desktop view and in the tablet view. But I want to hide it only in the mobile view.

Any suggestions?

2

There are 2 answers

0
Akber Iqbal On BEST ANSWER

Had to add one media query in css which hides the popover on mobile view:

  @media screen and (max-width:576px){
    ::ng-deep .popover{ display:none; }
  }

complete working stackblitz here

0
Ashfaq Hussain On
Hide popover I am using disable Popover
<button type="button" class="btn p-0 qty" placement="right" [ngbPopover]="popContent" [disablePopover]="isPopoverShow" >
------------------------------------------------------------------------

.TS
 if (window.innerWidth < 480) {
            this.isPopoverShow = true;
        }else {
            this.isPopoverShow = false;
        }