1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How to stop page refresh when a secondary component mounts and unmounts?

Discussão em 'Angular' iniciado por no_doubt, Maio 28, 2025.

  1. no_doubt

    no_doubt Guest

    I have a webpage with two components: a Left-Hand Side (LHS) and a Right-Hand Side (RHS). The RHS displays a table with rows, and the LHS shows a general card-like view. When I click a row in the RHS, I want the LHS card to update based on the selected row's data, and the clicked row should change its color.

    Everything works fine after the LHS component has mounted. However, on the first row click, when the LHS component loads for the first time, the entire page refreshes, and the RHS data resets—causing the row color change to be lost. The same issue occurs when a row is unselected and the LHS component is unmounted.

    Continue reading...

Compartilhe esta Página