I encountered a problem when using angular's route
, as shown in the picture below,
When I click on the query, I send the number to the background through $http
, and then the background returns the data to me. At this time, I want to jump to another route
. How do I use it in another route page? The data previously returned to me by the background?
If you use the ui-router plug-in, you can transfer data during route jump (recommended method) ui-router passes value
You can also consider placing the data in the service and reading the data from the service after jumping there.
You can also consider using events for data transfer.
Reference material:
Controller communication method in angular