Here is code showing the bug: https://stackblitz.com/edit/angular-gbn3kr
I am trying to dynamically update a total quantity field. I created a Quantity Component which is an input that takes in a number and stores that number. In my app component, I have an array of these Quantity Components. When I try QuantityComponent.getQuantity() from the app component, it is always returning 0 even though I know I am correctly setting the components quantity because the components quantities are correctly displaying.
I assume that this is because my QuantityComponent in the array is not being updated. Is my assumption right? How would you code this?