title: scope.data does not have a foreach method
body: <p>I am passing calling a Rest API in a controller, and passing data to a custom Angular controller. The array passing from controller, to directive, needs to be cleaned up /debugged (I think its also related to scope).</p>
  
  <p>I've tried different variations of my code.</p>
  
  <p>Inside my directive.js :</p>
  
  <p>What works: <code>console.log (scope.data)</code> - prints out the expected array data.</p>
  
  <p>What does not work : <code>scope.data.foreach ()</code> - never works , says </p>
  
  <blockquote>
    <p>scope.data does not have a foreach method</p>
  </blockquote>
  
  <p>.. indicating something is wrong</p>