Synchronous functions - in Angular
<p>I need to reach in the Angular synchronous functions (that the other waiting for the end of the first).</p>

<p>For example, I have two providers (MenuProvider and ShopProvider). </p>

<p>MenuProvider has a method :</p>

<pre><code>getMenuItemsForCurrentShop()
</code></pre>

<p>that over HTTP retrieves the menu items for the current shop.</p>

<p>ShopProvider has a method:</p>

<pre><code>setCurrentShopById(idShop:number)
</code></pre>

<p>that sets via HTTP which the shop is currently used.</p>

<p>I need to "getMenuItemsForCurrentShop()" called after "setCurrentShopById(idShop:number)". Ideally without callback.</p>