How to add URL slug?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
13 views
const app = new Vue({
el: '#app',
data: {
posts: [],
}

axios.get('http://asdasd/post/{slug}') // How to add slug to the URL?

.then(response => {
console.log(response);
this.posts = response.data;
})
.catch(function (error) {
console.log(error);
});
by | 13 views

1 Answer

0 like 0 dislike
axios.get(`http://asdasd/post/${slug}`)
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
110,608 questions
257,186 answers
0 comments
35,457 users