I have several functions attached to ng-click directive. The first function filters the list of items and is a a directive scope function, while the second method filters and puts markers on the map and it is the method from the controller. The problem is that the second method from the controller executes about 2 seconds and blocks the execution of the first scope function. Code sample :
<li ng-click="setFilter('favorite'); map.citiesFilter({favorite : true});">Best cities</li>
This method from the controller
map.citiesFilter({favorite : true});
executes 2 seconds and blocks the scope function
setFilter('favorite');
Am I doing somehing wrong, or is there any way to execute this functions asynchronously, so that user won't wait until heavy map filter method from controller ends executing.