I am doing my project in ionic 6 with
angular and a firebase database. I need a typescript function that adds the values fetched from an array that are extracted from a collection in firebase.
//Function to fetch the data from the "expenses" collection, the "expense_amount" column and add this data to the "setTransc" function
//Function to fetch the data from the "income" collection, the "expense_amount" column and add this data to the "setTransc" function
"setTransc()" function to sum the values of the array, then the "todo()" function has an await since the elements return a promise before being displayed.
It should be noted that I need to press a button for the values to be operated because I don't know how to do it in the background to show it directly in the label.