Merge branch '2.0' into labels-refactor

This commit is contained in:
Brandy Carney
2016-03-09 15:00:52 -05:00
6 changed files with 131 additions and 11 deletions

View File

@@ -207,7 +207,42 @@ export class Alert extends ViewController {
}
/**
* @param {object} opts Alert options
*
* Alert options
*
* | Property | Type | Description |
* |-----------------------|-----------|---------------------------------------------------------------------------|
* | title | `string` | The string for the alert (optional) |
* | subTitle | `string` | The subtitle for the alert (optional) |
* | message | `string` | The message for the alert (optional) |
* | cssClass | `string` | Any additional class for the alert (optional) |
* | inputs | `array` | An array of inputs for the alert. See input options. (optional) |
* | buttons | `array` | An array of buttons for the alert. See buttons options. (optional) |
* | enableBackdropDismiss | `boolean` | Wheather the alert should be dismissed by tapping the backdrop (optional) |
*
*
* Input options
*
* | Property | Type | Description |
* |-------------|-----------|-----------------------------------------------------------------|
* | type | `string` | The type the input should be, text, tel, number, etc (optional) |
* | name | `string` | The name for the input (optional) |
* | placeHolder | `string` | The input's placeholder (optional) |
* | value | `string` | The input's value (optional) |
* | label | `string` | The input's label (optional) |
* | chacked | `boolean` | Whether or not the input is checked or not (optional) |
* | id | `string` | The input's id (optional) |
*
* Button options
*
* | Property | Type | Description |
* |----------|----------|----------------------------------------------------------------|
* | text | `string` | The buttons displayed text |
* | handler | `any` | Expression that should be evaluated when the button is pressed |
* | cssClass | `string` | An additional CSS class for the button |
* | role | `string` | The buttons role, null or `cancel` |
*
* @param {object} opts Alert. See the tabel above
*/
static create(opts: AlertOptions = {}) {
return new Alert(opts);

View File

@@ -1,13 +1,13 @@
import {App, InfiniteScroll} from 'ionic-angular';
import {App, Page, InfiniteScroll, NavController} from 'ionic-angular';
@App({
@Page({
templateUrl: 'main.html'
})
class E2EApp {
class E2EPage1 {
items = [];
constructor() {
constructor(private nav: NavController) {
for (var i = 0; i < 30; i++) {
this.items.push( this.items.length );
}
@@ -30,9 +30,33 @@ class E2EApp {
});
}
goToPage2() {
this.nav.push(E2EPage2);
}
}
function getAsyncData() {
@Page({
template: '<ion-content><button (click)="nav.pop()">Pop</button></ion-content>'
})
class E2EPage2 {
constructor(private nav: NavController) {}
}
@App({
template: '<ion-nav [root]="root"></ion-nav>'
})
class E2EApp {
root;
constructor() {
this.root = E2EPage1;
}
}
function getAsyncData(): Promise<any[]> {
// async return mock data
return new Promise(resolve => {

View File

@@ -3,9 +3,9 @@
<ion-content>
<ion-list>
<ion-item *ngFor="#item of items">
<button ion-item (click)="goToPage2()" *ngFor="#item of items">
{{ item }}
</ion-item>
</button>
</ion-list>
<ion-infinite-scroll (infinite)="doInfinite($event)" threshold="100px">