Files
Brandy Carney b752432ef1 refactor(pull-to-refresh): rename the starting event to start
updated docs to reflect new name and renamed an internal function

BREAKING CHANGE: starting event no longer exists, must use start

References #5207
2016-02-17 12:29:30 -05:00

40 lines
727 B
TypeScript

import {App} from '../../../../../ionic/ionic';
@App({
templateUrl: 'main.html'
})
class E2EApp {
items = [];
constructor() {
for(let i = 0; i < 20; i++) {
this.items.push({ "index": i });
}
}
doRefresh(refresher) {
console.log('Doing Refresh', refresher)
// Add to the top of the list on refresh
let firstIndex = this.items[0].index - 1;
for(let i = firstIndex; i > firstIndex - 5; i--) {
this.items.unshift({ "index": i });
}
setTimeout(() => {
refresher.complete();
console.log("Complete");
}, 5000);
}
doStart(refresher) {
console.log('Doing Start', refresher);
}
doPulling(refresher) {
console.log('Pulling', refresher);
}
}