Currently, I am facing a challenge in retrieving a value that I had initially saved in the database as a sum of bits. My development work is based on Angular 9 using Typescript.
I have successfully managed to store the sum of bits in the database. Now, I need to display these values on another screen by fetching them from the database.
Assuming that in my .ts file, I have an array of strings:
bitwiseLabels: string[] =
['Kitchen', 'Bedroom', 'Living Room'];
From the database, I retrieve the number 3, which represents the sum of 1 and 2. As a result, I want to display 'Kitchen' and 'Bedroom' on the screen respectively.
Unfortunately, I haven't been able to find a working solution so far. Any advice or suggestions would be greatly appreciated.