Hello,
How to update data from the main app object?
App/Core data is a function.
I’m doing in the main app methods functions:
this.data.example
Didn’t find any example for this, but I think it’s not to good since data was originally a function.
$setState is only mentioned for components
var app = new Framework7({
root: '#app',
name: 'Test',
version: '1.0.0',
id: 'pl.Test.test',
theme: Framework7.device.desktop ? 'aurora' : 'auto',
data: function () {
return {
example: ''
}
},
methods: {
test: function() {
this.data.example = 'new value'
}
}
})