title: Wait for a server response (and check value) in Protractor test
body: <p>I have a page in my site that is making a request to the server and then using the result to populate a table.</p>
  
  <p>How can I write an e2e test for this? I am having trouble working out how to wait for the server response, and how I would get the data from the response, so I can then check it against the table contents.</p>
  
  <p>Here is a simplified example of my Angular controller:</p>
  
  <pre><code>angular.module("myApp").controller("myCtrl", function(MyService) {
  
     MyService.getData()
          .then(function (response) {
              $scope.data = response;
          });
  });
  </code></pre>
  
  <p>Then the html page is looping over the items in $scope.data to populate the table.</p>
  
  <p>Thanks for any help!</p>