title: get random line from text file
body: <p>I have the following code to load a random line as required from a text file:</p>
  
  <pre><code>$.get('txt/messages.txt', function(txt) {
  var lines = txt.responseText.split("\n");
  var randLineNum = Math.floor(Math.random() * lines.length);
  save(lines[randLineNum]); // random line from the text file
  });
  </code></pre>
  
  <p>How could I do the same with Angular, to place the value into a scope value instead?</p>