S
S
Socrates2018-08-19 13:15:14
Vue.js
Socrates, 2018-08-19 13:15:14

vue-router components not loading?

Guys, I don't understand something with routing.
1. created a project on cli
2. created a favorites component
3. made a routing to this component

import Vue from "vue";
import Router from "vue-router";
import Favorites from "../components/Favorites.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/favorites",
      name: "Favorites",
      component: Favorites
    }
  ],
  mode: "history"
});

4. in app.vue I made a transition to this component:
Favorites
does not throw any errors when clicking on the link, but the component is not called either, what could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Socrates, 2018-08-19
@Karmov69

router view

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question