mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Merge branch '2.0' into labels-refactor
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
|
||||
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user