Home

Issue: 898

ssr custom directive

[issue link]

Hello my custom directive not working on server side!

directive

Vue.directive('mydirective', {
  bind (el, binding) {
    el.innerHTML = 'mydirective worked';
  }
});

html template
<div v-mydirective="{foo: 'bar'}">initial text</div>

This code worked only browser - not working on server side ((
How fix this problem??

Thanks, really very need this.

PS.
How worked directive

v-html

This worked on server side and client side.

This question is available on Nuxt.js community (#c768)