I want to be able to create an reuseable subtag:
<tag>
<subtag id=subtag></subtag>
</tag>
Therefor I would like to use the observable pattern to communicate with the sub tag:
var self = this
subtag = riot.mount('#subtag')[0]
subtag.on('clicked', function(){
console.log('subtag has been clicked)
})
The code does not work since was already mounted. If I place the subtag outside the tag, it does however work. How to catch an event using the sub tag notation?