So i have a website that is Laravel & Vue based, and works perfectly on my Homestead server, but for some reason on the live server there are a few issues. The main issue seems to be that a few numbers on the live server are being represented as strings instead of integers. The code otherwise is the exact same. Thoughts as to why this might be?
1 Answer
When you pass a prop without v-bind, it is always interpreted as a plain string (as all attributes are), no matter what its content is.
If you want to pass a literal number, you need use v-bind:
<!-- this passes "5" -->
<calc additions="5"></calc>
<!-- this passes 5 -->
<calc :additions="5"></calc>