0

How to refresh a component/page in angular 2?.
I used routing to current URL. I don't know, it is not working properly.

How do I update DOM component when I redirect to same URL(where I was working) while routing?

Daniel
  • 3,458
  • 2
  • 32
  • 41
Dharan G
  • 383
  • 2
  • 5
  • 23
  • I don't understand your question properly. What do want to achieve? Just reloading a components data? Reload the whole site? Why? – Ore Aug 08 '17 at 08:20
  • i just want to detect changes and update Dom elements when i click refresh button. – Dharan G Aug 08 '17 at 08:23
  • i am using breadcrumb . while redirecting to previous page it's not loading properly . that's my actual situation – Dharan G Aug 08 '17 at 08:24
  • Well, now we're closer. Can you share your breadcrumb code? – Ore Aug 08 '17 at 08:34
  • My first guess to solve this problem would be subscribing to route changes. Like this https://stackoverflow.com/questions/33520043/how-to-detect-a-route-change-in-angular-2 This way you don't have to mess with event handling and reloading page. – Ore Aug 08 '17 at 08:36
  • In Breadcrumb i have refresh button . While click on the button, i need to refresh page/update DOM elements (current URL). I mean refreshing current URL when i click the button. That's it . But it is not working!.. – Dharan G Aug 08 '17 at 09:01
  • You Know it is redirecting but corresponding page is not showing all elements. So i need to refresh/update component. – Dharan G Aug 08 '17 at 09:04
  • Wow, I thought I know what you what, but now im more confused than before. Can you provide code, screenshots, whatever? – Ore Aug 08 '17 at 09:20

0 Answers0