[SOLVED] Ng-hide/ng-show not working as should

.controller('NoticiasCtrl', function ($scope, $timeout) {
  var pic = new Image();

$scope.noPosts = false;
$scope.posts = [];

$timeout(function() {
    if(cacheLatestPosts.length == 0) {
        $scope.noPosts = true;
} , 300, false);

My will is to show or hide the list and the empty message based on the availability of items.
But after the timeout the value changes but the visibility doesn’t.

the issue was the third parameter of the timeout…