• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Add values from an array brought from firebase and display them in a label

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Elermino Sacce
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Added to our Angular forum.


Thanks, where is that forum?
 
Marshal
Posts: 80084
412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's a pleasure
The forum is here; if you look where it says “languages” on your left.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic