0

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
  • did u find solution? Commented Mar 15, 2018 at 19:09

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.