當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。