Pull to refresh not sucking

This commit is contained in:
Max Lynch
2015-06-16 16:09:03 -05:00
parent d187150e7b
commit 4bef3b538d
2 changed files with 6 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
<ion-view nav-title="Pull to refresh">
<ion-content>
<ion-refresher (refreshing)="doRefresh($event, amt)"></ion-refresher>
<ion-refresher (refresh)="doRefresh($event, amt)"></ion-refresher>
<div id="counter"></div>

View File

@@ -7,7 +7,7 @@ import {Content} from 'ionic/ionic';
@Component({
selector: 'ion-refresher',
events: ['refreshing']
events: ['refresh']
})
@View({
template: '<div class="refresher"></div>',
@@ -20,18 +20,19 @@ export class Refresher {
this.domElement = element.domElement;
this.domElement.classList.add('content');
//this.refreshEvent = new EventEmitter('refreshing');
this.refresh = new EventEmitter('refresh');
setTimeout(() => {
this.doRefresh();
content.scrollElement.addEventListener('scroll', function(e) {
console.log('CONTENT: scroll', e.target.scrollTop);
});
}, 1000);
}
refresh() {
doRefresh() {
console.log('REFRESH');
this.refreshEvent.next({
this.refresh.next({
amt: 0
});
}