Use ui-router for routing. When some pages are entered, data must be obtained from the background.
Should I pull the data in the resolve of the ui-router, or use the service in the controller of the page to pull the data?
What are the advantages and disadvantages of the two methods?
In ui-router, the data is obtained first and then the page is loaded. In the controller, the page is rendered first and then the data is obtained.
When your ui-router request times out or errors, this page will not be displayed, giving people an abrupt feeling.
You can operate the data in the controller, which is better. This is how I understand it.
Flash~ (●'◡'●)ノ♥