Skip to content

Instantly share code, notes, and snippets.

@mattstauffer
Last active December 1, 2015 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattstauffer/21e9ca43563f204995ad to your computer and use it in GitHub Desktop.
Save mattstauffer/21e9ca43563f204995ad to your computer and use it in GitHub Desktop.
new Vue({
el: '#assignment-creator',
data: {
trainee: {}
},
ready: function () {
this.trainee = TrainRemote.trainee;
}
});
<script>
var TrainRemote = {
trainee: {
id: 5,
name: 'Matt Stauffer'
}
};
</script>
<div id="assignment-creator" v-cloak></div>
@adamwathan
Copy link

Or just...

<assignment-creator trainee-id="{{ $trainee->id }}" trainee-name="{{ $trainee->name }}"></assignment-creator>
Vue.component('AssignmentCreator', {
    props: ['traineeId', 'traineeName'],
    // etc.
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment