Thank you @dobbel
I had missed the impact of using an async boot function. That did the trick.
Latest posts made by steenole
-
RE: Wait for async data in boot file
-
RE: Wait for async data in boot file
I am aware of boot files.
In a boot file, I can start fetching the config data, but I can’t wait for the response, so my app will continue starting up, before my config data are ready. -
RE: Wait for async data in boot file
In plain Vue, I would do something like this, in mains.js, to defer the Vue instantiation.
But Quasar does not give me access to modify main.jsfetch(’/config.json’).then(res => res.json()).then(config => {
new Vue({
data(){
return config
},
render: h => h(app)
}).mount(’#app’)
}) -
Wait for async data in boot file
I have a single-page application which needs to get some configuration data from a json file, before the application can start. Things like api root and oauth configuration. This is needed because the same app runs on different environments, but with different configs.
In order to read the config file, I make an ajax fetch. But since this is asynchronous, the app starts before my data is ready.
How can I make my app wait for the config data, before it starts? -
Set input style globally
I am creating a webstie with a lot of form fields. I happen to like the “outlined” look of the input fields best.
It would be nice if I could define the style of my input fields in one place., instead of setting the “outlined” attribute on every single field. The same goes for “dense”I guess it is pretty common, that you would like all input fields in your app to have the same style. Is this possible?
I know I can extend the components and make my own, that are outlined and dense by default. But given that there are a lot of different input types, some kind of global style setting would be more elegant.