Skip to content

Commit

Permalink
chore(docs): rebuild readme after update to vue usage docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jthoms1 committed Mar 2, 2019
1 parent 928b2f7 commit ab57b98
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions core/src/components/loading/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,58 @@ export class LoadingExample extends Component<Props, State> {
```


### Vue

```vue
<template>
<IonVuePage :title="'Loading'">
<ion-button @click="presentLoading">Show Loading</ion-button>
<br />
<ion-button @click="presentLoadingWithOptions">Show Loading</ion-button>
</IonVuePage>
</template>
<script>
export default {
props: {
timeout: { type: Number, default: 1000 },
},
methods: {
presentLoading() {
return this.$ionic.loadingController
.create({
message: 'Loading',
duration: this.timeout,
})
.then(l => {
setTimeout(function() {
l.dismiss()
}, this.timeout)
return l.present()
})
},
presentLoadingWithOptions() {
return this.$ionic.loadingController
.create({
spinner: null,
duration: this.timeout,
message: 'Please wait...',
translucent: true,
cssClass: 'custom-class custom-loading',
})
.then(l => {
setTimeout(function() {
l.dismiss()
}, this.timeout)
return l.present()
})
},
},
}
</script>
```



## Properties

Expand Down

0 comments on commit ab57b98

Please sign in to comment.