本文整理汇总了TypeScript中ionic-angular.Tabs.select方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Tabs.select方法的具体用法?TypeScript Tabs.select怎么用?TypeScript Tabs.select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Tabs
的用法示例。
在下文中一共展示了Tabs.select方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: ionViewDidEnter
ionViewDidEnter() {
if (JSON.parse(localStorage.getItem("doLogin"))) {
this.tabRef.select(0);
} else {
this.tabRef.select(2);
}
}
示例2: next_page
next_page() {
var t: Tabs = this.nav.parent;
var myTab = t.getSelected();
var myTabIndex = t.getIndex(myTab);
t.select(1 + myTabIndex);
}
示例3: next_page
next_page() {
var t: Tabs = this.nav.parent;
var myTab = t.getSelected();
var myTabIndex = t.getIndex(myTab);
t.select(1 + myTabIndex); // SKIP OVER THE IDENTIFY_PLANT STUFF FOR NOW . . .
}
示例4: goToPage
/**
* Go to a page (via menu selection)
* @returns {void}
*/
public goToPage(page: TabPage): void {
const tabIndex: number = page.tabIndex;
// console.log('goToPage: ' + tabIndex + ', tabs: ' + this.tabs);
if (typeof this.tabs !== undefined) {
// we need this conditional because @ViewChild does not work
// when karma and this.tabs ends up undefined in karma
// TODO: make sure you get rid of this hack
this.tabs.select(tabIndex);
}
this.menu.close();
}
示例5: dismissModal
dismissModal() {
//dismiss the modal
this.viewCtrl.dismiss();
//switch to the items tab
this.parent.select(1);
//No idea how to inject data into the tab
}
示例6: moodAction
moodAction(mood){
console.log(mood);
switch (mood.type) {
case 'voice':
alert("voice");
var t: Tabs = this.nav.parent;
t.select(2);
break;
case 'relax':
this.content.setRoot(Page3, {}, { animate: false });
break;
default:
alert('default');
}
}
示例7:
(lastTabIndex: number) => {
console.log('initializeApp():lastTabIndex = ' +
lastTabIndex);
this.tabs.select(lastTabIndex);
});
示例8: ionViewDidEnter
ionViewDidEnter(){
this.tabRef.select(0);
}
示例9: goto_start_page
goto_start_page() {
var t: Tabs = this.nav.parent;
t.select(1); // UGLY HARD-CODE, but we KNOW the Start Page is "Page 1"
}
示例10: itemSelected
itemSelected(item) {
this.store.set("currrentId", JSON.stringify(item));
var t: Tabs = this.nav.parent;
t.select(1);
}