I want to execute a method (such as refreshing the page data) every time page A is about to be displayed. How should I implement this?
PS: The function in the controller is only called when the page is created. It will not be called when returning to this page again?
習慣沉默2017-05-15 16:55:21
You can use the resolve
option of routing to solve the operation you want to perform, and the returned data can be injected into the controller.