0

I have an app where users create a list of patients. Each patient (child component) contains a name and age. The app will calculate the number of patients and sum of all of the patient's age. How would I pass information from the child component to the parent component?

Note - In my <report> component I am currently hard coding the total-age attribute value to 0.

Currently, I have an addPatient() method addd to my Vue instance which pushes null into the patients array. I feel like I should be pushing something else other then null into this array. I have a v-for for each patients.

https://codepen.io/anon/pen/pOgdmW

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.