ui-router provides a transition transition object, transition.to() represents the activated state, and transition.from() represents the active state in the past;
Use transition.params('to') to represent the routing parameter details of the activated state;
Use transition.params('from') to represent the details of route parameters that were active in the past;