當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript ionic-angular.Nav類代碼示例

本文整理匯總了TypeScript中ionic-angular.Nav的典型用法代碼示例。如果您正苦於以下問題:TypeScript Nav類的具體用法?TypeScript Nav怎麽用?TypeScript Nav使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Nav類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: updateNav

 private updateNav(route: ActivatedRoute) {
   if (route.component === IonicApp) {
     route = route.firstChild;
     if (!this.nav.getActive() || this.nav.getActive().component !== route.component) {
       this.nav.setRoot(route.component, route.params, { animate: true, direction: 'forward' });
     }
   }
 }
開發者ID:firatkaradag,項目名稱:dbcook,代碼行數:8,代碼來源:app.component.ts

示例2:

 this.userData.HasUserSeenTutorialAsync().then((hasSeen)=> {
   if (!hasSeen) {
     this.nav.push(TutorialPage)
   }
   if (!this.userData.HasUserRegistered) {
     this.nav.push(SignupPage)
   }
 });
開發者ID:RickyTaterSalad,項目名稱:FireIonic2,代碼行數:8,代碼來源:app.ts

示例3: openPage

 //Open page nav + tabs solution thanks to ionic-conference
 //https://github.com/driftyco/ionic-conference-app/
 openPage(page) {
     if (page.component) {
         if (page.tab) {
             this.nav.setRoot(page.component, {tabIndex: page.tab});
         } else {
             this.nav.setRoot(page.component);
         }
     }
 }
開發者ID:epeuva,項目名稱:myAngularCampIonic2app,代碼行數:11,代碼來源:app.ts

示例4: openPage

 openPage(page) {
   // Reset the content nav to have just this page
   // we wouldn't want the back button to show in this scenario
   this.nav.setRoot(page.component);
   if(page.title== 'Logout'){
     this.storage.set('user.ID',0);
     this.nav.setRoot('LoginPage');
   }
 }
開發者ID:stojancelevski,項目名稱:pedometerv2,代碼行數:9,代碼來源:app.component.ts

示例5: 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);
   }
 }  
開發者ID:gdessard,項目名稱:handballStats,代碼行數:11,代碼來源:principal.ts

示例6: 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);
     }
   }
 }
開發者ID:University-of-Potsdam-MM,項目名稱:ReflectUP,代碼行數:17,代碼來源:app.component.ts

示例7:

    this.platform.ready().then(() => {
      if (this.authService.getSession())
        this.nav.setRoot(HomePage);
      else
        this.nav.setRoot(LoginPage);

      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      StatusBar.styleDefault();
      Splashscreen.hide();
    });
開發者ID:eduardorost,項目名稱:meutransporte,代碼行數:11,代碼來源:app.component.ts

示例8: viewSurvey

 viewSurvey(survey, surveyProgress) {
   this.nav.push(BeginSurveyPage, {
     survey,
     surveyProgress: this.surveyProgress,
     inProgress: this.inProgress
   });
 }
開發者ID:marenwoodruff,項目名稱:m2,代碼行數:7,代碼來源:survey-description.component.ts

示例9:

            .subscribe(result => {
                let companyData={
                  companyName:credentials.controls.CompanyName.value,
                  companyUsername:credentials.controls.Username.value,
                  companySecret:credentials.controls.SharedSecret.value,
                  reportSuites:result.report_suites,
                  researchedSuites:[]
                }

                //these things only need to live in temp storage
                this.storageService.currentCompany=credentials.controls.CompanyName.value;
                this.storageService.currentUsername=credentials.controls.Username.value;
                this.storageService.currentSharedSecret=credentials.controls.SharedSecret.value;

                //here is where we write to long-term and short-term storage
                if(this.storageService.companies && !this.storageService.companies.includes(credentials.controls.CompanyName.value)){
                  //only add the company to the companies array if it doesn't yet exist
                  this.storageService.addToStorageArray("companies",credentials.controls.CompanyName.value);
                  if(this.DTMenabled===true){ _satellite.data.customVars["api type"]="company login:refresh"}
                }else{
                  if(this.DTMenabled===true){_satellite.data.customVars["api type"]="company login:new"}
                }
                this.storageService.addToStorageComplex("companyData",credentials.controls.CompanyName.value,companyData)
                this.storageService.addToStorageSimple("currentCompany",credentials.controls.CompanyName.value)
                
                if(this.DTMenabled===true){_satellite.track("api success")}
                this.events.publish('showPage:RSList', true);
                loading.dismiss();
                this.nav.setRoot(TabsPage, { index: '1' });
            }, error => {
開發者ID:jkunz,項目名稱:pocketSDR,代碼行數:30,代碼來源:company-login.ts

示例10:

 this.auth.getUserData().subscribe(data => {
   if (!this.isAppInitialized) {
     console.log(data);
     this.nav.setRoot(BulletinBoardPage);
     this.isAppInitialized = true;
   }
 }, err => {
開發者ID:lgmbarata,項目名稱:eCondominio,代碼行數:7,代碼來源:app.ts


注:本文中的ionic-angular.Nav類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。