ionic2 popover怎么用
1个回答
展开全部
<button ion-button icon-only (click)="presentPopover($event)">
<ion-icon name="more"></ion-icon>
</button>这个是调用的
ts 文件需要引入包,这样:
import { PopoverController } from 'ionic-angular';
@Component({})
class MyPage {
constructor(public popoverCtrl: PopoverController) {}
presentPopover(myEvent) {
let popover = this.popoverCtrl.create(PopoverPage);
popover.present({
ev: myEvent
});
}
}
<ion-icon name="more"></ion-icon>
</button>这个是调用的
ts 文件需要引入包,这样:
import { PopoverController } from 'ionic-angular';
@Component({})
class MyPage {
constructor(public popoverCtrl: PopoverController) {}
presentPopover(myEvent) {
let popover = this.popoverCtrl.create(PopoverPage);
popover.present({
ev: myEvent
});
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询