title: angular service with endpoint
body: <p>I just started Angular and I want to create a simple service that can generate data with my api. </p>
  
  <p>I have a route that returns this : </p>
  
  <pre><code>/ranking/:id 
  </code></pre>
  
  <p>returns a ranking from results in a video game</p>
  
  <pre><code>[
    { 
      position: 1,
      user: 1234,
      score: 150
    }, {
      position: 2,
      user: 5678,
      score: 100
    }
   ...
  ]
  </code></pre>
  
  <p>then</p>
  
  <pre><code>/users?ids=id1,id2,id3
  </code></pre>
  
  <p>returns an array of users</p>
  
  <pre><code>[
   {
    id: 1234,
    firstName: 'John',
    lastName: 'Doe'
   },
   ...
  ]
  </code></pre>
  
  <p>What I'm trying to do is to create a function that can display an array of objects with my users inside by combining the endpoints so I can get an object like this :</p>
  
  <pre><code> [
    {
     position: 1,
     score: 150,
     firstName: 'John',
     lastName: 'Doe'
    },
    ...
   ]
  </code></pre>
  
  <p>Thanks for any help !</p>