-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
I was having issues with combining multiple Ractive-views with navstack and the documentation was rather limited on the matter. The active pane kept overwriting the previous panes. However, I finally figured it out myself. cue applause 😃
Here's my test setup:
stage = new Navstack({
el: $('#stack'),
transition: 'slide',
groupTransition: 'modal',
adapt: ['ractive'] // defining support for ractive
});
stage.push('#home', function() {
return new Ractive({
el: '#stack',
template: 'Hi {{name}}',
data: { name: 'Anders' },
append: true // this did the trick !
});
});
And you can then get the Ractive instance by doing this:
var name = stage.panes["#home"].view.get('name');
...or change the data with Ractive:
stage.panes["#home"].view.set('name', 'Rstacruz');
derozn
Metadata
Metadata
Assignees
Labels
No labels