0π
β
Iβm guessing you have shortened your code, so I can only go by what you have written:
Firstly donβt mount to body
, just create a div
with an id
and mount to that, secondly data
needs to return
an object inside a component:
data(){
return {
ready: null;
}
}
You are also concatenating with the php
syntax (dot) rather than a plus, so it should be:
'api/ready/games/' + this.gameid
And if gameid
is a number you should pass it using v-bind
:
<game v-bind:gameid="{{$gameid}}"></game>
Hopefully, that will get you someway to solving your problem, hereβs a JSFiddle that seems to work fine:
Source:stackexchange.com