[Vuejs]-Access External Link router-link button

0👍

The variable baseAppUrl in the global file seems to be loaded correctly.
The problem is another one: the button should be wrapped in the template tag like this:

<template>
    <div>
        <p>This is the base app URL: {{ baseAppUrl }}</p>

        <b-button size="sm" class="my-2 my-sm-0" :to="baseAppUrl">SINGUP</b-button>
    </div>
</template>

<script>
import { baseAppUrl } from '@/global'
export default {
  name: "app-header",
  data: function () {
    return {
      baseAppUrl: baseAppUrl,
    };
  },
  methods: {
  },
};
</script>

Plus make sure that the file global.js is placed in the right directory.

Leave a comment