本文整理汇总了TypeScript中ionic-angular.Nav.push方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Nav.push方法的具体用法?TypeScript Nav.push怎么用?TypeScript Nav.push使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ionic-angular.Nav
的用法示例。
在下文中一共展示了Nav.push方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
this.userData.HasUserSeenTutorialAsync().then((hasSeen)=> {
if (!hasSeen) {
this.nav.push(TutorialPage)
}
if (!this.userData.HasUserRegistered) {
this.nav.push(SignupPage)
}
});
示例2: viewSurvey
viewSurvey(survey, surveyProgress) {
this.nav.push(BeginSurveyPage, {
survey,
surveyProgress: this.surveyProgress,
inProgress: this.inProgress
});
}
示例3: viewSurvey
private viewSurvey(survey, lastQuestionIndex): void {
this.nav.push(SurveyPage, {
survey,
lastQuestionIndex,
inProgress: this.inProgress
});
}
示例4: viewSurveys
private viewSurveys(): void {
this.nav.push(EventSurveysPage, {
surveys: this.surveys,
event: this.event,
userEvents: this.userEvents
});
}
示例5: openPage
/**
* Opens a given page
* @param {MenuItem} page - Clicked page item
* @return {void}
*/
public openPage(page: MenuItem): void {
if (page.component) {
if (!page.home) this.nav.push(page.component);
else this.rootPage = page.component;
}
else if (page.link) window.open(page.link, '_system');
else if (page.action) page.action();
}
示例6: openPage
public openPage(page: any): void {
// close the menu when clicking a link from the menu
this.menu.close();
// navigate to the new page if it is not the current page
this.nav.push(page.component, {
chain: this.apiProvider.networkSettings.value.selectedNetwork.chain,
network: this.apiProvider.networkSettings.value.selectedNetwork.network
});
}
示例7: openPage
openPage(page) {
// close the menu when clicking a link from the menu
this.menu.close();
if (page.component == AccueilPage) {
//Principal page, it's root page
this.nav.setRoot(page.component);
} else {
// navigate to the new page if it is not the current page
this.nav.push(page.component);
}
}
示例8: openPage
/**
* openPage
*
* opens the selected page
* @param page
*/
openPage(page:PageInterface) {
// pushes selected page (except if its the HomePage, then it sets a new root)
if ((page.pageName == HomePage) && (this.nav.getActive().component != HomePage)) {
this.nav.setRoot(page.pageName, {fromSideMenu: true});
} else {
if (this.nav.getActive().component != page.pageName) {
this.nav.popToRoot();
this.nav.push(page.pageName);
}
}
}
示例9: setLoggedInAndRegisteredView
private setLoggedInAndRegisteredView() {
//sets the entire view stack
this.nav.push(TabsPage).then(()=> {
this.userData.HasUserSeenTutorialAsync().then((hasSeen)=> {
if (!hasSeen) {
this.nav.push(TutorialPage)
}
if (!this.userData.HasUserRegistered) {
this.nav.push(SignupPage)
}
});
});
}
示例10: startMultiPlayerGame
startMultiPlayerGame() {
this._gameStateService.startNewMultiPlayerGame();
this._nav.push(GameBoard);
}