What is the recommended approach to maintain view state using ionicframework / angularjs?

I'm new to Ionic Framework and AngularJs as well.

The app I'm working on has a view where user can search and the results are presented in a list. When the user clicks one of the list items, it navigates to details view. When user presses the "back" button at the header bar, the search text box and results list are empty and he must search again.

What is the recommended approach to, when the user presses the back button from details view, bring the search view populated with the previous search term and results? (would be nice to have the scroll position restored as well)

I know I can just store this information into some service, but this sounds like a lot of work.

Are there any other cool stuff like a view state service or something that can do this for me?

I know I can just store this information into some service, but this sounds like a lot of work.

really?

app.factory('searchData', function() {
  return {
    searchTerm: '',
    results: []
  };
});

that's how it's done. But it sounds like what you're really looking for is a cure for laziness...