From 26394ebfa2914d503b7b824d413f36225b14a13d Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Mon, 14 Sep 2015 14:36:14 -0500 Subject: [PATCH] Tighten up device --- demos/native/pages/device.ts | 9 +++++---- ionic/native/device/device.ts | 8 +++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/demos/native/pages/device.ts b/demos/native/pages/device.ts index e14ef566cc..da145e3c52 100644 --- a/demos/native/pages/device.ts +++ b/demos/native/pages/device.ts @@ -1,4 +1,4 @@ -import {IonicView} from 'ionic/ionic'; +import {IonicView, Device} from 'ionic/ionic'; @IonicView({ @@ -12,7 +12,8 @@ import {IonicView} from 'ionic/ionic';

Device

-
+
+ Device name: {{device.name}}
` @@ -20,7 +21,7 @@ import {IonicView} from 'ionic/ionic'; export class DevicePage { doDevice() { - let device = Device.getDevice(); - console.log('Got device', device); + this.device = Device.getDevice(); + console.log('Got device', this.device); } } diff --git a/ionic/native/device/device.ts b/ionic/native/device/device.ts index 6950aa78f0..660e39933c 100644 --- a/ionic/native/device/device.ts +++ b/ionic/native/device/device.ts @@ -20,7 +20,13 @@ export class Device { return this.ifPlugin(window.device, () => { return device; }, () => { - return {} + return { + name: Device.getName(), + model: Device.getModel(), + platform: Device.getPlatform(), + uuid: Device.getUUID(), + version: Device.getVersion() + } }); }