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

Published

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.

Source: New feed
Source Url How to trigger page refresh to update value change in sibling components in UI

Published
Categorized as angular, angular-ui, angular2-changedetection, parent-child, refresh

Answers

What you need is location.reload() if you want to refresh the page. This line of code acts like pressing F5 in the browser so consider if is there any data or change you want to keep or you are fine with the complete page refresh.

Otherwise consider using a service as suggested in the other comment.


Mark Robel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq