Skip to content

"this" in custom directives #5494

@ibyteyou

Description

@ibyteyou

I like idea custom directives, because it's best solution for connecting parent <-> indirect child.
BUT i can't find 'this' into directive function((
[http://codepen.io/PatriciusSanctus/pen/KmMpYE](example1: console.info => undefined)
example2:
`





<script> export default { data: () => ({ childedProp: '' }), directives: { 'prop-export': (el, binding, vnode) => { // ??? this =(, i want get childedProp from indirect-child.$data and set to parent component this[binding.value] = vnode.componentInstance.$data[binding.value] } } </script>

`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions