docs(refresher): update usage example content

This commit is contained in:
Brandy Carney
2018-07-09 18:37:21 -04:00
parent 8923aa7351
commit c9d5f3d379
2 changed files with 27 additions and 9 deletions

View File

@ -1,23 +1,42 @@
```html
<!-- Default Refresher -->
<ion-content>
<ion-refresher (ionRefresh)="doRefresh($event)">
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
</ion-content>
<!-- Custom Refresher Content -->
<ion-content>
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher-content
pullingIcon="arrow-dropdown"
pullingText="Pull to refresh"
refreshingSpinner="circles"
refreshingText="Refreshing...">
</ion-refresher-content>
</ion-refresher>
</ion-content>
```
```typescript
@Component({...})
export class NewsFeedPage {
import { Component } from '@angular/core';
@Component({
selector: 'refresher-example',
templateUrl: 'refresher-example.html',
styleUrls: ['./refresher-example.css'],
})
export class RefresherExample {
constructor() {}
doRefresh(event) {
console.log('Begin async operation', refresher);
console.log('Begin async operation');
setTimeout(() => {
console.log('Async operation has ended');
event.target.complete();
}, 2000);
}
}
```

View File

@ -1,13 +1,12 @@
```html
<!-- Default Refresher -->
<ion-content>
<ion-refresher slot="fixed">
<ion-refresher-content>
</ion-refresher-content>
<ion-refresher-content></ion-refresher-content>
</ion-refresher>
</ion-content>
<!-- or for custom content -->
<!-- Custom Refresher Content -->
<ion-content>
<ion-refresher slot="fixed">
<ion-refresher-content