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

88
Views
VueJS navega al componente secundario

Tengo un botón en un componente que al hacer clic navegará a su componente secundario.

Código de botón

 <button class="summary" @click="navigateToSummary"> <span>Summary</span> </button> methods:{ navigateToSummary() { return this.$router.push({ name: 'PortfolioSummary', params: { coinId: this.coinSummary.coinId }, }); }, }

código de enrutador

 { name: 'AppPortfolio', path: '/portfolio', component: AppPortfolio, children: [ { name: 'PortfolioSummary', path: ':coinId', component: PortfolioSummary, props: true, }, ], },

Al hacer clic en el botón, la URL se actualiza en el navegador, pero no navega al componente secundario. ¿Qué estoy destinado a cambiar?

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

0

Su vista de AppPortfolio requiere su propia <router-view> donde se representará PortfolioSummary .

Básicamente, cuando usa rutas secundarias anidadas de esta manera, requieren una router-view dentro router-view para establecer su configuración profunda de 2 árboles, un ejemplo de 3 para árboles profundos requerirá 3 router-views anidadas, y así sucesivamente y cuarto.

  • aplicación.vue

    <router-view>

    • Portafolio de aplicaciones

      <router-view>

      • PortafolioResumen
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!