Skip to content

Instantly share code, notes, and snippets.

@akshar100
Created November 16, 2013 20:19
Show Gist options
  • Save akshar100/7504816 to your computer and use it in GitHub Desktop.
Save akshar100/7504816 to your computer and use it in GitHub Desktop.
View Configurator is the most complex part.
var ResponseObject = ViewConfigurator(Router.getConfig(req.getPath())) // home.index
// Normal HTTP request
if(isNormal()){
var layout = getLayoutHandlebarTemplate(ResponseObject.layout)
var output = Handlebars.compile(layout,{
"title":ResponseObject["title"].render()
//and so on. In reality we simly iterate over ResponseObject to render each component.
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment