I need to reach in the Angular synchronous functions (that the other waiting for the end of the first).
For example, I have two providers (MenuProvider and ShopProvider).
MenuProvider has a method :
getMenuItemsForCurrentShop()
that over HTTP retrieves the menu items for the current shop.
ShopProvider has a method:
setCurrentShopById(idShop:number)
that sets via HTTP which the shop is currently used.
I need to "getMenuItemsForCurrentShop()" called after "setCurrentShopById(idShop:number)". Ideally without callback.