mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(): update examples
This commit is contained in:
@ -10,12 +10,6 @@ refresher.
|
||||
|
||||
|
||||
```html
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
</ion-content>
|
||||
```
|
||||
|
||||
|
||||
|
||||
23
core/src/components/refresher/usage/angular.md
Normal file
23
core/src/components/refresher/usage/angular.md
Normal file
@ -0,0 +1,23 @@
|
||||
```html
|
||||
<ion-content>
|
||||
<ion-refresher (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher-content></ion-refresher-content>
|
||||
</ion-refresher>
|
||||
</ion-content>
|
||||
```
|
||||
|
||||
```typescript
|
||||
@Component({...})
|
||||
export class NewsFeedPage {
|
||||
|
||||
doRefresh(event) {
|
||||
console.log('Begin async operation', refresher);
|
||||
|
||||
setTimeout(() => {
|
||||
console.log('Async operation has ended');
|
||||
event.target.complete();
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
21
core/src/components/refresher/usage/javascript.md
Normal file
21
core/src/components/refresher/usage/javascript.md
Normal file
@ -0,0 +1,21 @@
|
||||
```html
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
</ion-content>
|
||||
|
||||
<!-- or for custom content -->
|
||||
|
||||
<ion-content>
|
||||
<ion-refresher slot="fixed">
|
||||
<ion-refresher-content
|
||||
pulling-icon="arrow-dropdown"
|
||||
pulling-text="Pull to refresh"
|
||||
refreshing-spinner="circles"
|
||||
refreshing-text="Refreshing...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
</ion-content>
|
||||
```
|
||||
Reference in New Issue
Block a user