当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript Nav.setRoot方法代码示例

本文整理汇总了TypeScript中ionic-angular.Nav.setRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Nav.setRoot方法的具体用法?TypeScript Nav.setRoot怎么用?TypeScript Nav.setRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ionic-angular.Nav的用法示例。


在下文中一共展示了Nav.setRoot方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: 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

示例2: 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

示例3:

    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

示例4:

        (user) => {
           if (user) {
               console.log(user);

               this._navController.setRoot(EventsPage);
           }
        }
开发者ID:marenwoodruff,项目名称:m2,代码行数:7,代码来源:signup.component.ts

示例5: if

 this.storage.get('userLoginInfo').then((userLoginInfo) => {
     if (userLoginInfo != null) {
       let detModal =this.modalCtrl.create('CartPage');
       detModal.onDidDismiss((response) => {
         if(response!=undefined){
           if(response.type=='bulk'){
             this.navCtrl.setRoot('BulkPage',response);
           }else if(response.type=='checkout'){
             this.navCtrl.setRoot('CheckoutPage',response);
           }
           else if(response.type=='normal'){
             this.navCtrl.setRoot('NormalPage',response);
           }else{
             this.navCtrl.setRoot('HomePage')
           }
         }else{
             this.storage.get('cartData').then((data) => {
             this.cartCount = data.length;
           });
         }
       });
       detModal.present();
     }else{
       this.navCtrl.setRoot('LoginPage');
     }
 })
开发者ID:GunaUI,项目名称:Pure,代码行数:26,代码来源:home.ts

示例6: if

 handler : () => {
   this.dialogOpened = false;
   alert.dismiss();
   if(type == 'exit')
   {
     this.nav.setRoot(MPinPage);
     this.exitApp();
   }
   else if(type == 'logout')
   {
     localStorage.removeItem('username');
     localStorage.removeItem('password');
     localStorage.removeItem('MPin');
     this.nav.setRoot(LoginPage);
   }
 }
开发者ID:tejit2004,项目名称:app,代码行数:16,代码来源:app.ts

示例7: openPage

 openPage(page) {
   // 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
   //let nav = this.app.getComponent('nav');
   this.nav.setRoot(page.component);
 }
开发者ID:smukov,项目名称:AvI,代码行数:7,代码来源:app.component.ts

示例8: openPage

 openPage(page, logOut) {
   // Reset the content nav to have just this page
   // we wouldn't want the back button to show in this scenario
   if (logOut)
     this.auth.logoutUser();
   this.nav.setRoot(page.component);
 }
开发者ID:aviel829,项目名称:aroume,代码行数:7,代码来源:app.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.setRoot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。