Kristo
3 years ago
11
2
Vue

From Database to JS to Vue

Posted 3 years ago by Kristo

Is it advisable passing some nonsensitive data to vue within an inline script?

Blade

<script>
     var foo = {{ $foo }}
</script>

Vue.js

new Vue({
    data: { 
        foo: foo 
    }
});

Please sign in or create an account to participate in this conversation.