Skip to content

Instantly share code, notes, and snippets.

@smolinari
Last active October 2, 2018 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smolinari/e736ae92c37322f8ba4f86b3b49741d0 to your computer and use it in GitHub Desktop.
Save smolinari/e736ae92c37322f8ba4f86b3b49741d0 to your computer and use it in GitHub Desktop.
Index.vue
<template>
<q-page class="flex flex-center">
<div>
<q-btn @click="log" label="Log Stuff"></q-btn>
</div>
</q-page>
</template>
<script>
export default {
name: 'PageIndex',
data () {
return {
PageTitle: 'Page 2'
}
},
methods: {
log () {
if (this.$axios) {
const q = this.$q
this.$axios.get('/test', {
q,
validateStatus (status) {
if (status === 404) {
q.notify({
color: 'negative',
position: 'top',
message: 'This Page is not available',
icon: 'report_problem'
})
}
}
})
}
console.log('The Quasar object: ', this.$q)
console.log('The Quasar i18n object: ', this.$q.i18n)
console.log('The Root Vue instance: ', this.$root)
console.log('The Env Object: ', process.env)
}
},
meta () {
return {
pageTitle: this.pageTitle
}
},
created: function () {
console.log(this.title, this.pageTitle)
this.title = this.title + ' - ' + this.pageTitle
}
}
</script>
<style>
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment