I have this strange error which I cannot figure out.
I am using the latest VueJS, pulled from the official CDN with:
<script src="https://unpkg.com/vue/dist/vue.js"></script>
Specified line looks like below:
Did anyone experienced this? Is it a VueJS
problem?
Later edit:
I believe the error is here:
attrs: {
"type": "text",
"name": "phone",
"value": "",
"id": "phone",
"phone_number":
}
the v-bind on the "phone_number" field didn't work as expected for some reason.
Removed the :phone_number="phone_number"
and wrote it again, and it just worked.
If you are using Laravel and you are passing data in a Blade template like this:
<your-component :value="{{ $myValue }}"></your-component>
It may be that $myValue
is null and therefore the error occurs.
A simple way to fix this is to use json_encode
before passing values as an attribute to the component:
<your-component :value="{{ json_encode($myValue) }}"></your-component>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With