Broken links for related items

I’m learning about VueJS 2 developing a new version of my personal blog. Now my blog is based on Django, next version will be based on Django Rest Framework and Vue.

Below the blog post page view:

<template>
  <div>
    <b-container fluid>
      <div class="text-center">
        <img class="blog-img-header" :src="post.header_image">
        <h1 class="blogpost-title">{{ post.title }}</h1>
      </div>
      <hr>
      <b-row class="text-center">
        <b-col cols="3">
          <h3>
            {{ post.local_date }}
          </h3>
        </b-col>
        <b-col cols="3">
           ...
        </b-col>
        <b-col cols="3">
          <b-button
              variant="info"
              size="sm"
              :to="{ name: 'single_category', params: { slug_category: slug_category } }">
            {{ post.category }}
          </b-button>
        </b-col>
        <b-col cols="3">
          <b-button
              variant="warning"
              size="sm"
              v-for="tag in post.tags" :key="tag.id"
              :to="{ name: 'single_tag', params: { slug_tag: tag.slug_tag } }"
          >
            {{ tag }}
          </b-button>
        </b-col>
      </b-row>
      <hr>
      <article v-html="post.contents" class="article-blog"></article>
    </b-container>
  </div>
</template>

<script>
import { mainApiEndpointV1, apiService} from "@/commons/api.service";

export default {
  name: "Post",

  components: {},

  props: {
    slug_category: {
      type: String,
      required: true,
    },
    slug_post: {
      type: String,
      required: true,
    },
  },

  data() {
    return {
      post: {},
    };
  },

  methods: {
    getPost() {
      let endpoint = mainApiEndpointV1() + `blog/${this.slug_category}/${this.slug_post}`;
      apiService(endpoint)
        .then((data) =>{
          console.log(data);
          this.post = data;
        });
    }
  },

  created() {
    this.getPost();
  },

};
</script>

I’m be able to see title, contents and tag list but I can’t use the link single_tag to navigate between the list of posts related to a single tag.

A similar problem comes when I try to click on a link blog_post of a post that is present into the list of posts that are using a tag. Below the single tag view:

<template>
  <b-container fluid="">
    <h1 v-if="tag.item_counts > 1">Articoli che parlano di <em>{{ tag.tag_name }}</em></h1>
    <h1 v-else>Articolo che parla di <em>{{ tag.tag_name }}</em></h1>
    <hr>
    <div v-for="post in tag.related_blogtag" :key="post.id">
      <h3>
        <router-link
            class="custom-router-link"
            :to="{ name: 'blog_post', params: { slug_post: post.slug_post } }"
        >
          {{ post.title }}
        </router-link>
      </h3>
      <p>{{ post.description }}</p>
      <hr />
    </div>
  </b-container>
</template>

<script>
import { mainApiEndpointV1, apiService} from "@/commons/api.service";

export default {
  name: "Tag",

  props: {
    slug_tag: {
      type: String,
      required: true,
    },
  },

  data() {
    return {
      tag: {},
    };
  },

  methods: {
    getTagDetails() {
      let endpoint = mainApiEndpointV1() + `blog-tags/${this.slug_tag}`;
      apiService(endpoint)
        .then((data) =>{
          console.log(data);
          this.tag = data;
        });
    }
  },

  created() {
    this.getTagDetails();
  },

};
</script>

In both cases if I click on that link I go to the home page. What I’ve done wrong?

This is the router:

import Vue from "vue";
import VueRouter, { RouteConfig } from "vue-router";
import Home from "../views/Home.vue";
import Services from "../views/ServiceApp/List.vue";
import Service from "../views/ServiceApp/Single.vue";
import Categories from "../views/BlogApp/Category/List.vue";
import Category from "../views/BlogApp/Category/Single.vue";
import Post from "../views/BlogApp/Single.vue";
import Tags from "../views/BlogApp/Tag/List.vue";
import Tag from "../views/BlogApp/Tag/Single.vue";

Vue.use(VueRouter);

const routes: Array<RouteConfig> = [
  {
    path: "/",
    name: "home",
    component: Home,
  },
  {
    path: "/servizi",
    name: "services",
    component: Services,
  },
  {
    path: "/servizi/:slug_post",
    name: "single_service",
    component: Service,
    props: true,
  },
  {
    path: "/blog",
    name: "blog_home",
    component: Categories,
  },
  {
    path: "/blog/tags",
    name: "blog_tags",
    component: Tags,
  },
  {
    path: "/blog/tags/:slug_tag",
    name: "single_tag",
    component: Tag,
    props: true,
  },
  {
    path: "/blog/:slug_category",
    name: "single_category",
    component: Category,
    props: true,
  },
  {
    path: "/blog/:slug_category/:slug_post",
    name: "blog_post",
    component: Post,
    props: true,
  },
];

const router = new VueRouter({
  mode: "hash",
  // base: process.env.BASE_URL,
  routes,
});

export default router;