Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

122
Views
La instancia de VueRouter no responde

Estoy aprendiendo vue. Instalé vue-router por npm install vue-router. Registré VueRouter y definí mi ruta de URL en las instancias de VueRouter en el archivo main.js. Creado Acerca de los componentes y en el componente de archivo app.vue utilizado. Pero la ruta no funciona en http://localhost:8080/about/#/ url o http://localhost:8080/#/about . También traté de eliminar la etiqueta # de la URL. Aquí está el código fuente:

Principal.js

 import Vue from 'vue' import App from './App.vue' import VueRouter from 'vue-router' import About from './components/About'; Vue.use(VueRouter); const route = [ {path:'/about',component: About} ]; const router = new VueRouter({ route }); Vue.config.productionTip = false new Vue({ render: h => h(App), router: router, }).$mount('#app')

aplicación.vue

 <template> <div id="app"> <router-view/> </div> </template> <script> export default { name: 'App', components: { } } </script> <style> #app { font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; margin-top: 60px; } </style>

Acerca de.vue

 <template> <div id="about"> <h3>About Page</h3> </div> </template> <script> export default{ name: 'About' } </script>

Paquete.json

"dependencias": { "core-js": "^3.6.5", "vue": "^2.6.11", "vue-router": "^3.5.2" },

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

VueRouter está esperando routes pero le diste una propiedad de route .

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!