Navigation history & scroll position

I am trying to figure out how to retain the state of views when navigating with the back or forward button in the browser. What would be a good practice to handle history data and scroll position in Angular?

Thanks!