Data Transfer: From One template to another template


In my project i need to transfer data from one page to another page.

In Home page i have a button to select the product and the product details will be in another page, if my user select any of the product from second page it have to display it in first page. Need help to set the data in second page and get it in first page

Create an Angular service that holds the data, then have the controllers for each view depend on that shared service.