We have a "Search" ui-router state, which can be accessed from menu. It returns a list of results in that state. Then from the search, the user can click an individual item they found and go to an "individual item view state" for lack of a better description.
Right now, if the user uses the browser back button (I guess it's really a "history back" button?) and goes back to the previous state, the search controller runs anew. As far as I understand, and correct me if I am wrong, using back is basically like reloading a state from scratch.
The requirement for the project is to have the search populate with previous search criteria, BUT only if the user accesses it through the back button, not the menu.
I read this answer which basically tracks all state history and checks for $state history in a particular order to decide if the back button was used. That's great, but we have hundreds of states. Is there some other way?