Search code examples
angularrefreshparent-childangular-uiangular2-changedetection

How to trigger page refresh to update value change in sibling components in UI


I am facing issue when one sibling component changes value to be displayed in another sibling component. The value is being changed in script end, whereas the UI is not getting reflected of the change.


Solution

  • There are several ways to communicate the component to component,

    1. @Input and @output if components organised parent and child
    2. Rxjs Subject , Behaviour subject for sibiling components, and individual path components
    3. view child

    In your case I think it good to use subject . Please find Link maybe it will help to you

    Thanks