Open swift1 opened 9 years ago
I've also tried to add
compiled: function(){
console.log('compiled');
this.$on('broadcast', function(val){
console.log('incoming broadcast: ' + JSON.stringify(val));
this.$data = val;
})
}
to the sub component, but nothing happens when i run
vue.$children[0].$broadcast({currentSubView: "sub2"});
so I'm kinda lost atm :(
edit: I was missing a parameter in the broadcast :palm_tree:
I finally got it to work :smile: :smile: :smile:
It might not be the best way to do it, but at least it works: https://jsfiddle.net/9678Lor5/7/
If you have any tips on how to improve it, I'd like to know it :smiley:
I guess the clue was to realize that it's not possible to nest more than one sub-level of components inside a component.
Hi guys. I've created a manual router, but it only seems to work up until the first level. Does anyone see what's wrong here? Any help would be appreciated.
(The problem is that the sub view's sub view does not show up, like this:
)
is being set correctly, but it doesn't update the binding:
https://jsfiddle.net/9678Lor5/1/