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


TypeScript MenuController.close方法代碼示例

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


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

示例1: openPage

 openPage(page){
   if(page=='home') {
     this.rootPage=TabsPage;
     this.menu.close();
   }
   if(page=='tabs') {
     this.rootPage=HellopagePage;
     this.menu.close();
   }
   if(page == 'page') {
     this.rootPage=EcommerceHomePage;
     this.menu.close();
   }
 }
開發者ID:apk093,項目名稱:ionic2-ecommerce,代碼行數:14,代碼來源:app.ts

示例2: openPage

  openPage(page) {
    let storage = new Storage(LocalStorage);
    if (page.title == 'signIn' || page.title == 'signOut') {
      this.global.socket.emit('access', { token: '' });
      this.global.member = {
        id: '0', type: 'guest', typeMessage: 'roleGuest', picture: 'build/img/remax.png',
        name: 'Remax Thailand', shopName: ''
      };
      storage.set('memberInfo', JSON.stringify(this.global.member));
      //storage.remove('token');
      this.menu.close().then(() => {

        storage.set('page', page.title);
        this.global.isLogin = false;
        this.global.isMember = false;
        this.global.isShowMenu = false;
        this.nav.setRoot(LoginPage, {
          global: this.global
        });
      });
    }
    /*else if (page.title == 'cart' && this.global.cart.qty == 0) {
      
    }*/
    else {
      storage.set('page', page.title).then(() => {
        this.nav.setRoot(page.component, {
          global: this.global
        });
      });
    }
  }
開發者ID:RemaxThailand,項目名稱:RemaxMobile,代碼行數:32,代碼來源:app.ts

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

示例4: logoutUserOut

  logoutUserOut() {

    this.menu.close();
    window.sessionStorage.setItem("tokenid", '');
    let nav = this.app.getRootNav()
    nav.setRoot(LoginPage);
    
  }
開發者ID:artman202,項目名稱:tangent-app,代碼行數:8,代碼來源:app.ts

示例5: 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
   });
 }
開發者ID:bitjson,項目名稱:bitcore,代碼行數:9,代碼來源:app.component.ts

示例6: openPage

 openPage(page) {
   
   // navigate to the new page if it is not the current page
   let nav = this.app.getComponent('nav');
   nav.setRoot(page);
 
   // // close the menu when clicking a link from the menu
   this.menu.close();  // or: this.app.getComponent('leftMenu').close();
 }
開發者ID:robkuijpers,項目名稱:shaileopen,代碼行數:9,代碼來源: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');
   if (page.title == 'Deconnexion') {
     this.events.publish('user.logout');
   }
   nav.setRoot(page.component);
 }
開發者ID:vmarchaud,項目名稱:share_eat_mobile,代碼行數:10,代碼來源:app.ts

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

示例9: 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();
 }
開發者ID:zhu04303661,項目名稱:ionic-recorder,代碼行數:15,代碼來源:app.component.ts

示例10: Logout

  Logout(type) {

    //let nav = this.app.getComponent('nav');
    let titletext = '';
    let subtitle = '';

    this.menu.close();
    this.dialogOpened = true;

    if(type == 'exit')
    {
      titletext = 'Exit';
      subtitle = 'Are you sure you want to exit?';
    }
    else
    {
      titletext = 'Logout';
      subtitle = 'Are you sure you want to logout?';
    }

    let alert = this.alertCtrl.create({
      title: titletext,
      subTitle: subtitle,
      buttons: [
        {
          text:'Yes',
          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);
            }
          }
        },
        {
          text:'No',
          handler : () => {alert.dismiss(); this.dialogOpened = false;}
        }
      ]
    });

    alert.present();
  }
開發者ID:tejit2004,項目名稱:app,代碼行數:52,代碼來源:app.ts


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