How can I programmatically close a FAB Button list in IONIC 3?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
1) In HTML
<ion-fab top right #fab>
<ion-fab-list side="bottom">
<button ion-fab (click)="Close($event, fab)">
<ion-icon name="trash"></ion-icon>
</button>
</ion-fab-list>
</ion-fab>
2) In .TS
import { FabContainer } from 'ionic-angular';
.
.
.
Close(event, fab: FabContainer) {
fab.close();
}