Merge branch 'master' into 3.0

This commit is contained in:
Brandy Carney
2017-03-23 15:36:40 -04:00
7 changed files with 114 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ import { AlertInputOptions, AlertOptions, AlertButton } from './alert-options';
encapsulation: ViewEncapsulation.None,
})
export class AlertCmp {
activeId: string;
descId: string;
d: AlertOptions;

View File

@@ -27,5 +27,6 @@ export interface AlertInputOptions {
export interface AlertButton {
text?: string;
role?: string;
cssClass?: string;
handler?: Function;
};

View File

@@ -33,6 +33,7 @@ export class PageOne {
alert.addButton({
text: 'Cancel',
role: 'cancel',
cssClass: 'secondary',
handler: () => {
console.log('Confirm Cancel');
this.testConfirmResult = 'Cancel';

View File

@@ -0,0 +1,63 @@
import { Component, Input, NgModule } from '@angular/core';
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
@Component({
selector: '<my-img>',
template: '<ion-img [width]="width" [height]="height" [src]="src"></ion-img>'
})
export class MyImg {
@Input() width: any;
@Input() height: any;
@Input() src: any;
}
@Component({
templateUrl: 'main.html'
})
export class E2EPage {
images = [
{
width: '100',
height: '44',
src: '../img/batmobile.jpg'
},
{
width: '100',
height: '75',
src: '../img/knight-rider.jpg'
},
{
width: '100',
height: '68',
src: '../img/general-lee.jpg'
}
];
}
@Component({
template: '<ion-nav [root]="root"></ion-nav>'
})
export class E2EApp {
root = E2EPage;
}
@NgModule({
declarations: [
E2EApp,
E2EPage,
MyImg
],
imports: [
IonicModule.forRoot(E2EApp)
],
bootstrap: [IonicApp],
entryComponents: [
E2EApp,
E2EPage
]
})
export class AppModule {}

View File

@@ -256,7 +256,7 @@ export class InfiniteScroll {
let distanceFromInfinite: number;
if (this._position === POSITION_BOTTOM) {
distanceFromInfinite = ((d.scrollHeight - infiniteHeight) - d.scrollTop) - height - threshold;
distanceFromInfinite = d.scrollHeight - infiniteHeight - d.scrollTop - height - threshold;
} else {
assert(this._position === POSITION_TOP, '_position should be top');
distanceFromInfinite = d.scrollTop - infiniteHeight - threshold;
@@ -289,6 +289,10 @@ export class InfiniteScroll {
* to `enabled`.
*/
complete() {
if (this.state !== STATE_LOADING) {
return;
}
if (this._position === POSITION_BOTTOM) {
this.state = STATE_ENABLED;
return;