Coder Social home page Coder Social logo

Comments (5)

egoist avatar egoist commented on September 26, 2024 2

Oh, I misunderstand you.

There's no v-link directive in vue-router 2

Using a component called <router-link> instead:

<router-link to="/">/</router-link>

from vuepack.

LucasIcarus avatar LucasIcarus commented on September 26, 2024

"Failed to resolve directive: link (found in anonymous component)"

Haven't see this bug report before, but you sure about your Home.vue and Projects.vue are correct ?

In routes/index.js, when the routes of Router instance be rendered as <router-view> component, in Vue's debug system it is anonymous. Maybe follow the lint add the name attr to routes in routes/index.js or deal it with Chrome vue-devtools will help.

from vuepack.

egoist avatar egoist commented on September 26, 2024

Do not use require('../views/Home'), instead:

import Home from '../views/Home'

export default new Router({
  //...
  routes: [
    {
      path: '/',
      component: Home
    },
    //...
  ]
})

I don't know what goes wrong indeed, maybe related to the loader or something.

from vuepack.

chopfitzroy avatar chopfitzroy commented on September 26, 2024

Hey @egoist thank you! I did wonder if it was something like that!

Cheers.

from vuepack.

wanteed-lh avatar wanteed-lh commented on September 26, 2024

@egoist i try this solution but dosn't work with
that my error
[Vue warn]: Failed to resolve directive: link
(found in anonymous component - use the "name" option for better debugging messages.)

from vuepack.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.