解决:在同步ajax的外面包一层setTimeout,在setTimeout之前showBlock();
function() {
$scope.showBlock();
$timeout(function(){
syncAjax();//同步ajax
$scope.hideBlock();
});
function() {
$scope.showBlock();
$timeout(function(){
syncAjax();//同步ajax
$scope.hideBlock();
});