本文整理匯總了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);
}