Angular: Get data from one page to another : [example][1]

I want to know how to add inputted data from one page to another page like in the picture above with angular.

I have a home page where I have an input field and a button that leads to a second page. On the home page I want to add a name in the input field and on the second page I want that inputted name to appear. How can I do that? 

  [1]: https://i.stack.imgur.com/Nb8zX.png