title: Making an Ajax request using data from previous ajax request
body: <p>I am attempting to write an Angular page to communicate with my Nodejs server, but I have ran into a snag.</p>
  
  <p>I need to use multiple Ajax requests that rely on the data from previous ajax requests to work.</p>
  
  <p>So Ajax request #1 provides data that is used by all other Ajax requests, and Ajax request #2 uses data from ajax request #1 to get the data that Ajax request #3 needs.</p>
  
  <p>Since Angular is asynchronous, how can I make my script wait for the data from the first one before making the next ajax call.</p>
  
  <p>id = ajax()</p>
  
  <p>Wait for data</p>
  
  <p>token = ajax(id)</p>
  
  <p>wait for data</p>
  
  <p>gametoken = ajax(id, token)</p>
  
  <p>wait for data</p>