title: Angular v4: Do we store data in a Service or the Component or both?
body: <p>Angular v4: Do we store data in a Service or the Component or both?</p>
  
  <p>After reviewing quite a few tutorials, as well as reading the documentation of Angular, I'm still not clear on this subject.</p>
  
  <p><a href="https://angular.io/tutorial/toh-pt2" rel="noreferrer">https://angular.io/tutorial/toh-pt2</a> Angular's tutorial clearly shows data stored in the Component. </p>
  
  <p><a href="https://angular.io/guide/architecture#services" rel="noreferrer">https://angular.io/guide/architecture#services</a> Angular's Architecture > Services section shows code with the service having an array of data (is this proper?).</p>
  
  <p><strong>If we store data in Components</strong>, we would heavily used @Input and @Output to move data between child components (assuming we want this data in the front end), however this poses a problem when we use routing, we would need our new Component which loaded from the router-outlet to make a new call to our service for a promise to make the API call to our server to hold data. Possibly in this case we would have 2 components holding the same data - however they may not match.</p>
  
  <p><strong>If we store data in a Service</strong>, we would heavily use our Services to retrieve data, and manipulate data (assuming we want this data in the front end) this way our service holds 1 set of data, and each component may call on the service data at any time to get consistent data.</p>
  
  <p>--</p>
  
  <p>What is the proper way of storing data?
  Is one of the other not advised?</p>