-
-
- x: {{accel.x}}
- y: {{accel.y}}
- z: {{accel.z}}
-
-
-
- x: {{accelTrack.x}}
- y: {{accelTrack.y}}
- z: {{accelTrack.z}}
-
-
- `
-})
-export class DeviceMotionPage {
- doDeviceMotion() {
- let device = DeviceMotion.getCurrentAcceleration().then((resp) => {
- console.log('Device motion', resp);
- this.accel = resp.accelerationIncludingGravity;
- }, (err) => {
- console.log('Device err', err);
- });
- console.log('Got device', device);
- }
- doDeviceMotionWatch() {
- let device = DeviceMotion.watchAcceleration().source.subscribe((resp) => {
- console.log('Device motion track', resp);
- this.accelTrack = resp.accelerationIncludingGravity;
- }, (err) => {
- console.log('Device err', err);
- });
- console.log('Got device', device);
- }
-}
diff --git a/ionic/components/app/test/native/pages/device-orientation.ts b/ionic/components/app/test/native/pages/device-orientation.ts
deleted file mode 100644
index 78158798cd..0000000000
--- a/ionic/components/app/test/native/pages/device-orientation.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import {IonicView, DeviceOrientation} from 'ionic/ionic';
-
-import {CSS} from 'ionic/util/dom';
-
-import {NgStyle, forwardRef, Host, Component, View, ElementRef} from 'angular2/angular2';
-
-@IonicView({
- template: `
-