i have built pretty small jsfiddle demonstrating access directive value within bind function. unfortunately, return undefined.
https://jsfiddle.net/matiascx/vz07t9wy/1/
bind: function(){ console.log(this.value); this.el.innertext = this.value; }
you using wrong hook in directive. docs say, bind directive called once , doesn't value passed directive. have use update directive.
update: function (value) { console.log(value); this.el.innertext = value; }
here the fiddle example
Comments
Post a Comment