How to return the actual data from within a timeout instead of the timeout promise
<p>I'm trying to return data from a function but I need a timeout in order to wait for some data to be set before doing some actions. However I can't figure out the most vital piece.</p>

<p>How can I return <code>'A string'</code> from <code>myFunc</code> instead of the <code>$timeout</code> promise? </p>

<pre><code>function myFunc() {

  return $timeout(function() {

    return 'A string';
  });
}
</code></pre>