Assign variable value to asynchronous method
<p>help me, I want to set variable value into asynchronous method (data is load from db), the problem is value will set to last record. here is my code :</p>

<pre><code>var _resolve = {
    lazyLoad: ['$ocLazyLoad', function($ocLazyLoad) {
        return $ocLazyLoad.load(angular.copy(angular.fromJson(menu.resolve)));
    }]
}
</code></pre>

<p>example data :</p>

<pre><code>&gt; -- one.js
&gt; -- two.js
&gt; -- three.js
</code></pre>

<p>from the code above, menu.resolve is object from database, menu resolve will return "three.js" in all rows. how to set variable value into each row?</p>

<p>Thank! :)</p>