title: Keeping state when changing between tabs
body: <p>I am making a reservation application with angular and the reservation goes in a three way process.</p>
  
  <p>In step 1: The <code>dateFrom</code> and <code>dateTo</code> can be picked which are both <code>Date</code> type</p>
  
  <p>In step 2: The amount of reserved items and their price can be selected which is in a class I mad <code>Formula</code> with <code>price: number</code> and <code>amount: number</code>.</p>
  
  <p>In step 3: the checkout will happen this is a form with some input fields</p>
  
  <p>these are in a <code>reservation-component</code>. If I want the state off 1,2,3 to stay when swapping between them what is the best approach do I save it all in the <code>reservation-component</code> or how can I store it differently? I am thinking of making a <code>Reservation</code> class which holds the dateFrom, dateTo and the Formula, but will it really work?
  <a href="https://i.stack.imgur.com/jgASn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jgASn.png" alt="state"></a></p>