0👍
As stated in the comment below, I think this might be happening because vue is interpreting your $customerId
as an equation.
$customerId = time() . rand(0, 100000) . '-' . $redItem->id;
If the $redItem
‘s id was 1, this would generate someting like: 155743641671228-1
However, when you v-bind a prop (you’re using the : shorthand to do so), any input provided to it will first be interpreted by javascript. So what you’re seeing when you inspect your prop is the sum of: 155743641671228 – 1 (155743641671227).
Therefore, if you replace the ‘-‘ with something that isn’t a javascript operator when you generate your customer id – it should work.
For example:
$customerId = time() . rand(0, 100000) . ':' . $redItem->id;
I would have thought that removing the v-bind would also cause this to work, but I may be wrong…
Hope it helps!
- [Vuejs]-How to use v-model for both form and populate the dropdown
- [Vuejs]-How to use VueJs plugin vue-lazyload
0👍
This is a string, there is no need to json encode it. nor is there a reason to bind it as its not a variable from the vue instance.
<Flashbar user-ref="{{ $customerId }}" />
- [Vuejs]-How do I overwrite input items in session in Vue.js?
- [Vuejs]-B-table and row elements functions