chore(demos): move app tests to demos

This commit is contained in:
Tim Lancina
2015-09-09 15:49:06 -05:00
parent 347c8877a4
commit 50a4549e8e
74 changed files with 111 additions and 0 deletions

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

33
demos/native/index.ts Normal file
View File

@ -0,0 +1,33 @@
import {Component} from 'angular2/angular2';
import {Control, ControlGroup} from 'angular2/forms';
import {App, Http} from 'ionic/ionic';
import {Camera, Geolocation, Vibration, Battery, Device} from 'ionic/ionic';
import {CameraPage} from 'pages/camera';
import {BatteryPage} from 'pages/battery';
import {ContactsPage} from 'pages/contacts';
import {DevicePage} from 'pages/device';
import {DeviceMotionPage} from 'pages/device-motion';
import {GeolocationPage} from 'pages/geolocation';
import {VibrationPage} from 'pages/vibration';
@App({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
this.firstPage = CameraPage;
console.log('First page', CameraPage);
this.plugins = [
{title: 'Camera', page: CameraPage},
{title: 'Device', page: DevicePage},
{title: 'Device Motion', page: DeviceMotionPage},
{title: 'Geolocation', page: GeolocationPage},
{title: 'Contacts', page: ContactsPage},
{title: 'Battery', page: BatteryPage},
{title: 'Vibration', page: VibrationPage},
]
}
}

12
demos/native/main.html Normal file
View File

@ -0,0 +1,12 @@
<ion-aside #aside [content]="content" id="mainMenu">
<ion-toolbar><ion-title>Plugins</ion-title></ion-toolbar>
<ion-content>
<ion-list>
<ion-item *ng-for="#p of plugins" (^click)="openPage(aside, p)">
<span>{{p.title}}</span>
</ion-item>
</ion-list>
</ion-content>
</ion-aside>
<ion-nav #content swipe-back-enabled="false" [root]="firstPage"></ion-nav>

View File

@ -0,0 +1,18 @@
import {IonicView} from 'ionic/ionic';
@IonicView({
template: `
<ion-navbar *navbar>
<button aside-toggle>
<icon menu></icon>
</button>
<ion-title>Device Motion</ion-title>
</ion-navbar>
<ion-content class="padding">
</ion-content>
`
})
export class DeviceMotionPage {
}

View File

@ -0,0 +1,26 @@
import {IonicView} from 'ionic/ionic';
@IonicView({
template: `
<ion-navbar *navbar>
<button aside-toggle>
<icon menu></icon>
</button>
<ion-title>Vibration</ion-title>
</ion-navbar>
<ion-content class="padding">
<h2>Device</h2>
<button primary outline (click)="doDevice()">Get Device</button>
<div>
</div>
</ion-content>
`
})
export class DevicePage {
doDevice() {
let device = Device.getDevice();
console.log('Got device', device);
}
}

View File

Before

Width:  |  Height:  |  Size: 519 KiB

After

Width:  |  Height:  |  Size: 519 KiB

22
demos/sink/main.html Normal file
View File

@ -0,0 +1,22 @@
<ion-aside #aside [content]="content" id="mainMenu">
<ion-toolbar><ion-title>Ionic 2.0</ion-title></ion-toolbar>
<ion-content>
<ion-list>
<ion-item *ng-for="#c of components" (^click)="openPage(aside, c)">
<span>{{c.title}}</span>
</ion-item>
</ion-list>
</ion-content>
</ion-aside>
<ion-nav #content swipe-back-enabled="false"></ion-nav>
<style>
my-modal {
display: block;
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
}
</style>

View File

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB