powmedia / backbone.xview Goto Github PK
View Code? Open in Web Editor NEWEasy to use view manager for Backbone. Effortless nested views and templating.
License: MIT License
Easy to use view manager for Backbone. Effortless nested views and templating.
License: MIT License
Hi,
I am planning to use your plugin for my book, and had an example working previously.
Strangely, after switching to {pushState: false}
the latest DetailsView
is not cleaned up, see demo: http://pipefishbook.com/ch_4/# (select a movie, and then click "home")
And the source: at https://github.com/pipefishbook/ch_4/blob/master/layout/app/views/layout.js#L17-L31
Is this is an issue with Backbone.XView ? I've the impression that it might be a zombie view, but not sure.
Thanks for your feedback!
Hi,
I was wondering how this works with non underscore template engines.
When using a template string, it fails with:
Uncaught TypeError: Property 'template' of object [object Object] is not a function
Maybe it would make sense to check if template is a function or not?
Hi,
I am stuck with a simple looking thing.
I had 1 view added and removed dynamically to the layout:
setDetails: function(movie) {
if (this.currentDetails) {
this.removeView(this.currentDetails);
this.render();
}
var view = new DetailsView({model: movie});
this.addView('#details', {id: view.cid}, view);
this.currentDetails = view.cid;
}
So far, and re-rendering was working great. Now, I've added a 3rd view like this:
this.addView('#overview', new MoviesList({
collection: options.router.movies,
router: options.router
}));
this.addView('#controls', new Controls({
collection: options.router.movies
}));
and also tried the unwrap
mode:
Backbone.$('#controls').html((new Controls({
collection: options.router.movies
})).render());
Strangely, after the first adding/removing of a view in the layout, the control view becomes a zombie view. Any ideas how to debug this? That would be great, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.