anatomy-server
Advanced tools
Comparing version 0.0.1 to 0.0.2
11
index.js
@@ -11,2 +11,3 @@ (function() { | ||
module.exports = function(app, index) { | ||
Backbone.$ = null; | ||
Backbone.isServer = true; | ||
@@ -18,7 +19,9 @@ Backbone.Router.prototype.route = function(route, name) { | ||
render = function() { | ||
var markup, template, _ref; | ||
markup = _this.appView.toHTML(true); | ||
var collection, model, template; | ||
model = _this.appView.views[1].model; | ||
collection = _this.appView.views[1].collection; | ||
template = index({ | ||
markup: markup, | ||
model: JSON.stringify((_ref = _this.lastFetched) != null ? _ref.toJSON() : void 0) | ||
markup: _this.appView.toHTML(true), | ||
navigationItems: JSON.stringify(_this.appView.views[0].collection.toJSON()), | ||
model: JSON.stringify(model || collection) | ||
}); | ||
@@ -25,0 +28,0 @@ return res.end(template); |
{ | ||
"name": "anatomy-server", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Server side Backbone code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
3026
41