My goal is to update an AngularJS variable from a controller function. When I console.log the variable, it updates instantly. However, when I try to display it on the view, it takes about 5-8 seconds to update.
I've tried using both ng-model and curly braces, but in both cases, there is a delay in updating the view compared to the console output.
The uploadedMedia function is called in the fine uploader callback and works fine with console.log.
$scope.updateUploadedMedia = function(){
console.log($scope.Album[0].Media.length);
$scope.UploadedMediaVal = $scope.Album[0].Media.length;
console.log($scope.Album[0].Media.length);
}
$scope.initializeFineUploader = function(){
var fileCount = 0;
var uploader = new qq.FineUploaderBasic({
multiple: true,
autoUpload: true,
title: "Attach Photos",
button: $("li[data-type='uploadMediabutton']")[0],
// Rest of the code remains unchanged...
});