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


TypeScript InAppBrowser.create方法代码示例

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


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

示例1: if

 handler: () => {
   this._store.dispatch(new AppVersionsActions.NotfiedUserAction());
   if (this._platform.is("ios")) {
     this._iab.create(APP_STORE_URL, "_system");
   } else if (this._platform.is("android")) {
     this._iab.create(GOOGLE_PLAY_URL, "_system");
   }
   return false;
 }
开发者ID:bGraphic,项目名称:varsom-hybrid,代码行数:9,代码来源:ui-update-alert.effects.ts

示例2: rateApp

 /**
  * Open the app store page
  */
 public rateApp() {
     if (this.platform.is('android')) {
         this.inAppBrowserPlugin.create('market://details?id=' + AppSettings.appId.android, '_system');
     } else if (this.platform.is('ios')) {
         this.inAppBrowserPlugin.create('itms-apps://itunes.apple.com/fr/app/vliller/id' + AppSettings.appId.ios + '?mt=8', '_system');
     } else {
         Raven.captureException(new Error('Rate app - Unknow platform?!'));
     }
 };
开发者ID:blckshrk,项目名称:vliller,代码行数:12,代码来源:sidemenu.ts

示例3: launchExternalApp

    launchExternalApp(iosSchemaName: string, androidPackageName: string, appUrl: string, httpUrl: string, username: string) {
        let app: string;
        if (this.device.platform === 'iOS') {
            app = iosSchemaName;
        } else if (this.device.platform === 'Android') {
            app = androidPackageName;
        } else {
            let browser = this.iab.create(httpUrl, '_system');
            return;
	    }

        this.appAvailability.check(app).then(
		    () => { // success callback
			     let browser = this.iab.create(appUrl + username, '_system');
		    },
		    () => { // error callback
			     let browser = this.iab.create(httpUrl, '_system');
		    }
	    );
    }
开发者ID:creattico,项目名称:petrolcompany2,代码行数:20,代码来源:smartpay.ts

示例4: Promise

    return new Promise((resolve, reject) => {

      this.logger.info(eicformatlog(EicOauth2AuthorizeService.name, "Config: " + this.config, true));

      const uri = this.config.authorizeUrl +
        "?client_id=" + this.config.params.clientId +
        "&redirect_uri=http://localhost/callback&response_type=token";

      const browserRef = this.appBrowser.create(uri,
          "_blank", "location=no,clearsessioncache=yes,clearcache=yes");

      this.logger.debug(eicformatlog(EicOauth2AuthorizeService.name, "URI: " + uri));

      browserRef.on("loadstart").subscribe(event => {

          if ((event.url).indexOf("http://localhost/callback") === 0) {

              browserRef.on("exit").subscribe(event => {});
              browserRef.close();

              this.logger.debug(eicformatlog(EicOauth2AuthorizeService.name, "URL callback: " + event.url));

              const responseParameters = ((event.url).split("#")[1]).split("&");
              const parsedResponse = {};

              for (const responseParameter of responseParameters) {
                  parsedResponse[responseParameter.split("=")[0]] = responseParameter.split("=")[1];
              }

              if (parsedResponse["access_token"] !== undefined) {
                  resolve(parsedResponse);
              } else {
                  reject();
              }
          }
      });

      browserRef.on("exit").subscribe( event => {
          reject();
      });
    });
开发者ID:davsuapas,项目名称:Angular2Ionic2ReusableApplications,代码行数:41,代码来源:oauth2-authorize.service.ts

示例5: launch

 launch(url) {
   this.iab.create(url, '_system');
 }
开发者ID:StreetSupport,项目名称:streetsupport-app,代码行数:3,代码来源:about.ts

示例6: openLink

 /**
  *
  * @param {String} link
  */
 public openLink(link) {
     this.inAppBrowserPlugin.create(link, '_system');
 };
开发者ID:blckshrk,项目名称:vliller,代码行数:7,代码来源:sidemenu.ts

示例7:

 this.platform.ready().then(() => {
   this.inAppBrowser.create(url, '_system');
 });
开发者ID:Rodrigo54,项目名称:Ola-Mundo-Ionic,代码行数:3,代码来源:home.ts

示例8: openSelected

 public openSelected(item: string) {
   console.log(item);
   this.iab.create(item);
   
 }
开发者ID:jctovar,项目名称:iztacala,代码行数:5,代码来源:social.ts

示例9: volunteer

 public volunteer() {    
   let url = this.settingsProvider.BaseUrl + "/Event/" + this.task.EventId;
   this.iab.create(url, '_self');
 }
开发者ID:BillWagner,项目名称:allReady,代码行数:4,代码来源:task.ts

示例10: onForgotPassword

  onForgotPassword() {
     var url = "https://hashtag.bigidea.co.il/account/password/forgot?type=1&locale=" + this.translate.currentLang;
     let browser = InAppBrowser.create(url, "_system");

  }
开发者ID:inamit,项目名称:bigidea,代码行数:5,代码来源:login.ts


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