I'm facing an issue with displaying a list of products from my firebase database. Despite updating the $scope.products
array and seeing it reflected in the console log, the changes are not being reflected on the user interface.
app.controller("productManagerController", ["$scope", function ($scope) {
$scope.products = [];
db.ref("products").once('value').then(function (snapshot) {
const values = snapshot.val()
for (key in values) {
values[key].id = key;
$scope.products.push(values[key])
}
console.log($scope.products) // The values retrieved from firebase are logged
// However, UI doesn't update accordingly
})
}])