I'm starting to work now with Laravel 5 + Vue.js and I'm having trouble with loading from my page. My Vue variables are exposed at startup and are only rendered after javascript loads. My example is as follows:
// adicionei o 'setTimeout' somente para simular o problema
setTimeout(function(){
var app = new Vue({
el: '#foo',
data: {
form: {
email: ''
},
messages: {}
}
});
}, 1000);
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script><formid="foo" v-on:submit.prevent>
<div>
<label>E-mail</label>
<input type="text" v-model="form.email" />
<small v-if="messages.email">@{{messages.email}}</small>
</div>
</form>
I need to know if there is any way for me to make the declaration of my <small/>
which displays the error messages to the user but without using the keys, so no matter how long the screen takes to load I still have a better UX ..