当前位置: 首页>>代码示例>>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;未经允许,请勿转载。