I\'m building an app with laravel and VueJs and I was wondering how to pass a url parameter like the user slug or the user id to vuejs in a proper way to be able to use that pa
You can get the url of the link you click and then use this url to do your ajax request.
methods: {
load: function(elem, e) {
e.preventDefault();
var url = e.target.href;
this.$http.get(url, function (data, status, request) {
// update your vue
});
},
},
And in your template call this method when the user click on a link:
link