Skip to content

πŸš€ Installation ​

To start using WBC-Routes2, you need to install the core plugin and ensure vue-router is enabled in your project.

1. Install Dependencies ​

If you haven’t installed wbc-ui2 yet, run:

bash
npm install wbc-ui2
# or
yarn add wbc-ui2

Make sure you also have vue-router set up:

bash
npm install vue-router
# or
yarn add vue-router

2. Register the WBC Component Globally (Optional) ​

In your main.js or app.js:

js
import Vue from "vue";
import VueRouter from "vue-router";
import WBC from "wbc-ui2";

Vue.use(VueRouter);
Vue.component("WBC", WBC);

3. Set Up the Routes ​

Here’s a basic example of how to use WBC in a route:

js
const routes = [
  {
    path: "/dynamic",
    name: "DynamicRoute",
    component: WBC,
    props: {
      item: "./docs/helloWorld.md"
    },
  },
];