You are right. I solved removing a statusbar Cordova plugin.
Thanks!
You are right. I solved removing a statusbar Cordova plugin.
Thanks!
Solved:
needed to upgrade nodejs:
https://github.com/vuejs-templates/webpack-simple/issues/88
http://www.hostingadvice.com/how-to/update-node-js-latest-version/
Hope can help.
Thanks man,
i solved with
quasar build -m cordova -T android
really appreciated your help.
oh, maybe i didn’t explain it as good as i want: i have quasar 0.15 already installated with all my projects. I just asking if is possible update it (considering that are developing it right now) so i can have it updated every day
Hi,
i’m wondering about update quasar 0.15 without reinstall everything.
Thanks in advance.
Thanks for your help guys! Solved with vuex.
Ok, same problem with a fresh installation. Do you have the same problem? I will let my code so you can reproduce it:
just change pages/index.vue code with
<template>
<q-page class="flex flex-center">
<q-toggle
v-model="$optionsObject.FlagCardsHeader"
@click.native="ChangeHeaderCardsStatus($optionsObject.FlagCardsHeader)"
/>
</q-page>
</template>
<script>
import {
QToggle
} from 'quasar'
export default {
name: 'PageIndex',
components: {
QToggle
},
methods: {
ChangeHeaderCardsStatus (asd) {
console.log(asd)
}
}
}
</script>
and this is a plug-in
// import something here
// leave the export, even if you don't use it
export default ({ Vue }) => {
Vue.prototype.$optionsObject = {
FlagCardsHeader: false,
}
}
@leopiccionia said in Impossible set global variable on quasar 0.15:
Silly question, but are you sure that the function is being called? Have you tried substituting
@click
by@click.native
?
Ok i tried with @click.native
and finally i can execute the function (i can see the console.log()), with just @click
the function is not execute. Anyway i think is the toggle object that change the this.$optionsObject.FlagCardsHeader
value in fact its change also without the @click method (just clicking on the toggle).
@benoitranque said in Impossible set global variable on quasar 0.15:
Try
console.log()
instead of{{variable}}
. Like I said, it probably is not reactive, meaning even if variable value changes, it will not be detected by Vue. Anyways this is a Vue issue and not a Quasar issue.
It is like you say, vue not refresh the variable.
Gonna to try a fresh installation and see if i will have the same result.
I’m pretty sure you dont need “deviceready” with quasar. In fact quasar wait for the device ready automaticatly.
Anyway look at this maybe you need install <plugin name="cordova-plugin-whitelist" source="npm" spec="1.1.0" />
.
Thanks for you help leo,
to see the correct variable’s value is enough change component. Is like quasar doesn’t refresh the variable in the current component. So I think is a refresh problem. With quasar 0.14.8 I used this.$root.variable and it worked perfectly.
I just discovered that the variable change but quasar doesn’t refresh it. In fact if i go to another component and back to the first one the variable’s value is true (i see the header active in my app also).
So actually i dont have any idea how solve the problem.
I just put it on my component’s layout:
{{$optionsObjectFlagCardsHeader}}
this is the toggle the active the method:
<q-toggle
v-model="$optionsObject.FlagCardsHeader"
@click="ChangeHeaderCardsStatus()"
/>
and this is the function:
ChangeHeaderCardsStatus () {
this.$optionsObject.FlagCardsHeader = true
}
anyway i’m gonna to check out vuex, but i think is too much for 4 global variables ^^