How to position a popover in Ionic 2

后端 未结 7 513
别那么骄傲
别那么骄傲 2020-12-08 15:25

How do I manually position a popover in Ionic 2?

I can\'t set the position in a css class, since the popover controller sets the position with an inline style.

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 15:47

    if you want the popover next to te button, pass to the function create() the event, like this

    //home.html

    
    

    //home.ts

     presentRadioPopover(event) {
        const popover = this.popoverCtrl.create(HomepopoverPage);
        popover.present({
          ev: event
        });
      }
    

提交回复
热议问题