In Vue.js, if I have a component, such as custom-input, and I want to set focus from the parent class, can a directive from the parent be applied to the child?
<custom-input v-focus />
<div class='form-group'>
<input :v-focus='vFocus'> // This doesn't work
</div>
<script type='text/javascript'>
Vue.directive("focus", {
inserted: function(el) {
el.focus();
}
});
</script>