Skip to content

Commit

Permalink
Re-evaluate vmRoute href on component update.
Browse files Browse the repository at this point in the history
  • Loading branch information
dicky authored and dicky committed Aug 11, 2019
1 parent c0b8713 commit f06c947
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions DevApp/src/dotnetify/vue/directives.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,10 @@ Vue.directive('vmRoute', {
e.preventDefault();
vue.vm.$handleRoute(e);
});
},
componentUpdated: function(el, binding, vnode) {
const vue = vnode.context;
const route = binding.value;
if (route && vue.vm) el.href = vue.vm.$route(route);
}
});

0 comments on commit f06c947

Please sign in to comment.