Closed
Description
When I define a twoWay directive and use set function in bind, there is an error 'can't read property set of undefined' , my code follows.
Vue.directive('tags',{
twoWay:true,
bind: function () {
var self=this;
console.log(self);
$(self.el).on('itemAdded',function(){
self.set($(this).val());
});
},
unbind:function(){
$(this.el).off();
}
});
Metadata
Metadata
Assignees
Labels
No labels