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


TypeScript ionic-angular.Platform类代码示例

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


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

示例1: constructor

    constructor(nav:NavController, platform:Platform) {
        this.nav = nav;


        platform.ready().then(() => {


        });

    }
开发者ID:ionutleustean,项目名称:MyWaiter,代码行数:10,代码来源:homePage.ts

示例2: constructor

    constructor(platform: Platform)
    {

        this.policy = "Privacy policy";
        this.policyURL = "https://s3.priority-software.com/terms/master_privacy_policy.pdf";
        if (platform.is("ios"))
            this.termsURL = "https://s3.priority-software.com/terms/master_termsofuse_appstore.pdf";
        else
            this.termsURL = "https://s3.priority-software.com/terms/master_termsofuse_googleplay.pdf";
    }
开发者ID:PrioritySoftware,项目名称:app-template,代码行数:10,代码来源:app.config.ts

示例3: show

 show(message = '') {
   if (this.platform.is('cordova')) {
     this.toastNative.show(message, `${TOAST_DURATION}`, this.config.getToast('position', TOAST_POSITION)).subscribe();
   } else {
     this.toastCtrl.create({
       message,
       duration: this.config.getToast('duration', TOAST_DURATION)
     }).present();
   }
 }
开发者ID:pinkasey,项目名称:activegan,代码行数:10,代码来源:toast.ts

示例4: if

    /**
     * opens the url with the system app if installed or in the browser
     * @param url url of the website
     */
    openYouTube(url) {
        let app;
        if (this.platform.is('ios')) {
            app = 'youtube://';
        }
        else if (this.platform.is('android')) {
            app = 'com.google.android.youtube';
        }

        AppAvailability.check(app).then(
            function () {  // Success callback
                open(url, '_system', 'location=no');
                console.log('YouTube is available');
            },
            function () {  // Error callback
                open(url, '_system', 'location=no');
                console.log('YouTube is not available');
            });
    }
开发者ID:GSE-Project,项目名称:SS2016-group3,代码行数:23,代码来源:about.ts

示例5: initializeApp

  private initializeApp(): void {
    this.platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.

      // https://github.com/lathonez/clicker/issues/148#issuecomment-254436635
      // StatusBar.styleDefault();
      console.log('production: ' + environment.production);
    });
  }
开发者ID:mbakker96,项目名称:clicker,代码行数:10,代码来源:app.component.ts

示例6: ngOnInit

 ngOnInit() {
   //console.dir(this.el.nativeElement.attributes);
   if(this.color === 'light' && this.platform.is('ios')){
     this.color = 'primary'
     this.el.nativeElement.style.color = `var(--color-${this.color})`;
   }else{
     this.el.nativeElement.style.color = `var(--color-${this.color})`;
   }
   
 }
开发者ID:Microsmsm,项目名称:Dawaey,代码行数:10,代码来源:color.ts

示例7: createDeleteButton

 createDeleteButton(message, handler) {
   
   return {
       text: this.translate.instant(message),
       role: 'destructive',
       icon: !this.platform.is('ios') ? 'trash' : null,
       cssClass: 'WorkoutAction-delete',
       handler
   } 
 }
开发者ID:vadzim-kazak,项目名称:workout-log,代码行数:10,代码来源:workouts-actions.provider.ts

示例8: initializeApp

  initializeApp() {
    this.platform.ready().then(() => {
      // 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();

      //Initialize facebook
      this.authProvider.initFacebook();
    });
  }
开发者ID:pro-to-tip,项目名称:pro-to-tip.github.io,代码行数:10,代码来源:app.ts


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