Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
Passing data between Lit Element templates when using router

I am new to Lit Element, let's say I have two lit templates : <page-one> and <page-two> and I'm using Vaadin Router to navigate between them.

I have initialized the Routes as :

router.setRoutes([
{
path: "/",
component: "page-one",
},
{
path: "/page-two",
component: "page-two",
action: async () => {
    await import(
        "../src/components/page-two"
    );
  }
])

And I have added a button click to navigate to the other template using Router.go("page-two") , which is working fine.

Since I am not using the second template inside a Render(), how do I pass on data from <page-one> to <page-two> ?

Note : If I had it in the Render() method, I could have passed it as a @property , like : <page-two @value="data"> </page-two>. But that is not the case here.

about 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda