K
K
Konstantin Malyarov2018-05-17 23:43:40
Vue.js
Konstantin Malyarov, 2018-05-17 23:43:40

How to get array from component to VueJS instance?

There is a component with models:

data: function () {
        return {
            active_list_appointments_template: false,
            patient: null,
            disease_history: null,
            drug: {
                id: null,
                patient: null,
                disease_history: null,
                drug: null,
                start_day: null,
                end_day: null,
                is_delete: false,
            },
            list_appointments_drugs: [],
        }
    },

How to pass the list_appointments_drugs array to an instance from a component?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Malyarov, 2018-05-18
@ Konstantin18ko

Made via global event events:
Source Sink
this.$root.$on('remove', function (id) {...})

D
Dmitry Belyaev, 2018-05-18
@bingo347

<child-component :prop="list_appointments_drugs" />

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question