Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

154
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda