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


TypeScript app-version.AppVersion類代碼示例

本文整理匯總了TypeScript中@ionic-native/app-version.AppVersion的典型用法代碼示例。如果您正苦於以下問題:TypeScript AppVersion類的具體用法?TypeScript AppVersion怎麽用?TypeScript AppVersion使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: constructor

 constructor(private navCtrl: NavController, private navParams: NavParams, private alertCtrl: AlertController, private viewCtrl: ViewController, private storage: Storage, private events: Events, private appVersion: AppVersion, private barcodeScanner: BarcodeScanner, private userService: UserService, private utilService: UtilService) {
   this.user = {
     loginname: '',
     avatar_url: '',
     accesstoken: ''
   }
   this.appVersion.getVersionNumber().then((data) => {
     this.versionNumber = data
   }).catch((error) => {
     console.log(error);
     this.versionNumber = '請在手機中運行';
   });
 }
開發者ID:lqxlcc,項目名稱:Ionic2-CNodeClub,代碼行數:13,代碼來源:login.ts

示例2: constructor

 constructor(private navCtrl: NavController, private navParams: NavParams, private events: Events, private appVersion: AppVersion, private badge: Badge, private storage: Storage, private userService: UserService, private utilService: UtilService, private messageService: MessageService) {
   this.user = {
     avatar_url: '',
     loginname: '',
     score: '',
     create_at: '',
   };
   events.subscribe('messageCount', (data) => {
     this.messageCount = data;
   });
   this.versionNumber = '請在手機中運行';
   this.appVersion.getVersionNumber().then((data) => {
     this.versionNumber = data
   }).catch((error) => console.log(error));
 }
開發者ID:lqxlcc,項目名稱:Ionic2-CNodeClub,代碼行數:15,代碼來源:account.ts

示例3:

 this.platform.ready().then(() => {
   if(this.platform.is('cordova')) {
     this.av.getAppName().then((name) => {
       this.appName = name;
     });
     this.av.getVersionNumber().then((version) => {
       this.appVersion = version;
     });
     this.appRate.preferences.storeAppURL = {
       ios: '1186113597',
       android: 'market://details?id=com.scripture-golf.ldsscripturegolf',
       windows: 'ms-windows-store://pdp/?ProductId=9wzdncrdnjbc'
     };
   }
 });
開發者ID:jbw91,項目名稱:scripture-golf,代碼行數:15,代碼來源:about.ts

示例4: Promise

 return new Promise((resolve) => {
     this.appVersion.getVersionNumber().then((value: string) => {
         resolve(value);
     }).catch(err => {
         this.warn('getVersionNumber:' + err);
     });
 });
開發者ID:qwb0920,項目名稱:LlgApp,代碼行數:7,代碼來源:NativeService.ts

示例5: ionViewDidLoad

  ionViewDidLoad() {
    this.appVersion.getAppName().then(v => {
      this.appName = v;
    });

    this.appVersion.getPackageName().then(v => {
      this.packageName = v;
    });

    this.appVersion.getVersionCode().then(v => {
      this.versionCode = v;
    });

    this.appVersion.getVersionNumber().then(v => {
      this.versionNumber = v;
    });
  }
開發者ID:WarriorsWCH,項目名稱:ionic-app,代碼行數:17,代碼來源:versions.ts

示例6: Promise

 return new Promise(resolve => {
   Promise.all([this.appVersion.getVersionNumber(), this.appVersion.getVersionCode()]).then(result => {
     resolve(`${this.device.platform} ${this.device.version}<br>
       ${this.device.manufacturer} ${this.device.model}<br>
       ${window.screen.width * window.devicePixelRatio}x${window.screen.height * window.devicePixelRatio}<br>
       Cordova ${this.device.cordova}<br>
       Metho v${result[0]}(${result[1]})`);
   }).catch(err => {
     resolve(`${this.device.platform} ${this.device.version}<br>
       ${this.device.manufacturer} ${this.device.model}<br>
       ${window.screen.width * window.devicePixelRatio}x${window.screen.height * window.devicePixelRatio}<br>
       Cordova ${this.device.cordova}`);
   });
 });
開發者ID:Bouzmine,項目名稱:metho,代碼行數:14,代碼來源:report.ts

示例7:

 .then(() => appVersionPlugin.getVersionNumber())
開發者ID:blckshrk,項目名稱:vliller,代碼行數:1,代碼來源:sidemenu.ts

示例8: getVersion

 getVersion(): any {
     return this.appVersion.getVersionNumber();
 }
開發者ID:intasect,項目名稱:intalinx-mobile,代碼行數:3,代碼來源:about-service.ts

示例9: ionViewDidLoad

 async ionViewDidLoad() {
   this.version = await this.appVersion.getVersionNumber();
 }
開發者ID:EnriqueTun23,項目名稱:pescaderia,代碼行數:3,代碼來源:home.ts


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