Angular JS don't load value in the scope from function javascript

File javascript:


    function timelineDB(){    
    const db = firebase.database();
        const ref = db.ref('timeline/-L-g_Ea4colCKXtMstqE');
        ref.orderByChild('data').on('value', showData, showError);
        var itens = [];
        function showData(item){
            item.forEach(function(child){
            console.log(child.val());
            itens.push({data: child.val().data});
            })
        }

        function showError(err){
            console.log(err);
        } 
        console.log(itens);
        return itens;
    };

File index.html

angular.module("horizontalTimeline", []);
        angular.module("horizontalTimeline").controller("horizontalTimelineCtrl", function($scope){ //, $http           
            $scope.timeline = [];   
            console.log($scope.timeline); //Here I have value
            $scope.timeline = timelineDB(); 
            $scope.$apply(); //Don't works
});
{{timeline}} //NULL