• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript ionic-angular.App类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了TypeScript中ionic-angular.App的典型用法代码示例。如果您正苦于以下问题:TypeScript App类的具体用法?TypeScript App怎么用?TypeScript App使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: if

this.emailProvider.EmailServerLogin(id,password).then((res:any)=>{
        console.log("MyApp:"+JSON.stringify(res));
        if(res.result=="success"){
            if(res.userInfo.hasOwnProperty("shopList")){
                //save shoplist
                this.storageProvider.shoplistSet(JSON.parse(res.userInfo.shopList));
            }
            this.storageProvider.emailLogin=true;
            this.storageProvider.userInfoSetFromServer(res.userInfo);
            this.app.getRootNav().setRoot(TabsPage);
        }else if(res.result=='failure'&& res.error=='multiLogin'){
                // How to show user a message here? move into error page?
                // Is it possible to show alert here?
            this.app.getRootNav().setRoot(MultiloginPage,{id:id});
        }else{ 
            console.log("사용자 정보에 문제가 발생했습니다. 로그인 페이지로 이동합니다.");
            this.app.getRootNav().setRoot(LoginPage);
        }
    },login_err =>{
开发者ID:raceyi,项目名称:takit,代码行数:19,代码来源:error.ts


示例2: if

this.kakaoProvider.login().then((res:any)=>{
        console.log("MyApp:"+JSON.stringify(res));
        if(res.result=="success"){
            //save shoplist
            if(res.userInfo.hasOwnProperty("shopList")){
                this.storageProvider.shoplistSet(JSON.parse(res.userInfo.shopList));
            }
            this.storageProvider.userInfoSetFromServer(res.userInfo);
            this.app.getRootNav().setRoot(TabsPage);
        }else if(res.result=='failure' && res.result=='invalidId'){
            console.log("사용자 정보에 문제가 발생했습니다. 로그인 페이지로 이동합니다.");
            this.app.getRootNav().setRoot(LoginPage);
        }else if(res.result=='failure'&& res.error=='multiLogin'){
                // How to show user a message here? move into error page?
                // Is it possible to show alert here?
            this.app.getRootNav().setRoot(MultiloginPage,{id:"kakao"});
        }else{
            console.log("invalid result comes from server-"+JSON.stringify(res));
            //this.storageProvider.errorReasonSet('로그인 에러가 발생했습니다');
            //this.app.getRootNav().setRoot(ErrorPage);   
        }
    },login_err =>{
开发者ID:raceyi,项目名称:takit,代码行数:22,代码来源:error.ts


示例3: resolve

 (response: any) => {
   if (response.meta.return_code == 0) {
     if (response.data) {
       resolve(response.data)
       loader.dismiss()
     } else {
       reject("bad request")
       loader.dismiss()
       this.app.getRootNav().pop()
       this.toastService.showText("serverUnreachable")
     }
   } else {
     reject("bad request")
     loader.dismiss()
     this.app.getRootNav().pop()
     this.toastService.showString("Error " + response.meta.return_code + ", server says: " + response.meta.message)
   }
 },
开发者ID:caom92,项目名称:Espresso,代码行数:18,代码来源:app.inventory.ts


示例4: groupEventClick

 private groupEventClick(e: any): void {
   // console.debug('courseClick :', e);
   this.appCtrl.getRootNav().push('ProductPage', {
     ...this.navParams.data,
     productId: e.product.id,
     productItemId: e.product.refProduct.itemId,
     shopTypeId: this.shopTypeId,
   });
 }
开发者ID:PoompisekK,项目名称:myWork,代码行数:9,代码来源:group-event.page.ts


示例5: resolve

 (response: any) => {
   if (response.meta.return_code == 0) {
     if (response.data) {
       resolve(response.data)
       this.storage.set("log-" + suffix, response.data)
       logLoader.dismiss()
     } else {
       reject("bad request")
       logLoader.dismiss()
       this.app.getRootNav().pop()
       this.toastService.showText("serverUnreachable")
     }
   } else {
     reject("bad request")
     logLoader.dismiss()
     this.app.getRootNav().pop()
     this.toastService.showString("Error " + response.meta.return_code + ", server says: " + response.meta.message)
   }
 }, (error: any, caught: Observable<void>) => {
开发者ID:caom92,项目名称:Espresso,代码行数:19,代码来源:app.logs.ts


示例6: productClick

  private productClick(e: any, shopTypeId: string, shopId: string): void {
    // console.debug('our product :', e);

    this.appCtrl.getRootNav().push('ProductPage', {
      ...this.navParams.data,
      productId: e.product.id,
      productItemId: e.product.refProduct instanceof ProductItemModel ? e.product.id : undefined,
      shopTypeId,
      shopId,
    });
  }
开发者ID:PoompisekK,项目名称:myWork,代码行数:11,代码来源:organization-home.page.ts


示例7: handleError

  //Function to handle Errors
  handleError(error, expected?) {

    //TODO: Allow for overiding error codes, and using custom callbacks

    //Log the error
    console.log(error);

    //Get our status
    let status = error.status;

    //Check if we have any callbacks for specific error codes
    if (expected) {
      for (let i = 0; i < expected.length; ++i) {
        if (expected[i].status == status) {

          //Launch the call abck and return
          expected[i].callback();
          return;
        }

      }
    }

    if (status == 400) {
      //400 Bad Request
      this.showToast('Bad Request. Please ensure your input is correct.');
    } else if (status == 401) {
      //401 Unauthorized

      //Logout
      this.appAuth.logout();

      //Redirect to home
      let nav = this.app.getActiveNav();
      nav.setRoot(Home);

      //Toast the user
      this.showToast('Unauthorized. Please log back in.');
    } else if (status == 404) {

      //Toast the user
      this.showToast('Could not be found. Please ensure your input is complete and correct.');

    } else if (status == 500) {
      //Internal Server Error

      //Toast the user
      this.showToast('Internal Server Error. Please try making the request again, or at a later time.');
    } else {
      this.showToast('Error ' + status + ': Please Contact Developers for help.');
    }


  }
开发者ID:pro-to-tip,项目名称:pro-to-tip.github.io,代码行数:55,代码来源:app-notify.ts


示例8:

 this.nativeStorage.getItem("id").then((value:string)=>{
         console.log("value:"+value);
         if(value==null){
             console.log("id doesn't exist");
             this.app.getRootNav().setRoot(LoginPage); 
             return;
         }else{
             var id=this.storageProvider.decryptValue("id",decodeURI(value));
             console.log("id:"+id);
             this.loginWithExistingId();
         }
 });        
开发者ID:raceyi,项目名称:takit,代码行数:12,代码来源:error.ts


示例9: expandChartModalLimitsAndExposures

  //open Chart in full screen
  expandChartModalLimitsAndExposures() {

    // Get the same chart data on this page and set title
    let chartData = this.chartLimitsAndExposureData;
    chartData.title = { text: this.cpInfo.name };
    chartData.subtitle = { text: 'Limits & Exposures'};

    this.app.getRootNav().push(OnlyChartPage, { "chartData": chartData });

    
    //let modal = this.modalCtrl.create(ChartModalPage, { "chartData": chartData });
    //modal.onDidDismiss(()=>{
    //});

    //modal.present();
    
  }
开发者ID:letuthanhson,项目名称:ionic,代码行数:18,代码来源:counterparty-info.ts


示例10: nav

 private get nav() {
   return this.app.getActiveNav();
 }
开发者ID:PedalPi,项目名称:Apk,代码行数:3,代码来源:navigator.ts



注:本文中的ionic-angular.App类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript ionic-angular.Config类代码示例发布时间:2022-05-25
下一篇:
TypeScript ionic-angular.Animation类代码示例发布时间:2022-05-25
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap