How to reload the current state in angular 2?

I have two different components: search string

and mail list

. I want to do the following behavior: when I pass text to the search bar and click on the search button, the state mail list

that has already been opened with the route, for expample .../mail-list/4

, should be completely reloaded, that is, the state should grab new data from the shared service that contains new search text for filtering mail.

I tried to use router.navegate([router.url])

but it has no effect.

+3
angular


source to share


No one has answered this question yet

See similar questions:

1
Angular2 how to make JavaScript load again on change between components using routes

or similar:

728
Angular HTML binding
563
Huge amount of files generated for each Angular project
42
Angular 2 reload route with parameter change
1
Reactivating Angular 6 form on back button click based on values ​​originally marked
1
Refreshing corner component
1
Angular 2 reload current component based on user input
0
how to reload the same component after browser refresh in angular app 4
0
How to use pre-unload event in corner
0
Angular 2: How to save the state of the app via navigation to an external page?
0
Angular2 component reloads twice for no reason



All Articles
Loading...
X
Show
Funny
Dev
Pics