Created
November 16, 2013 20:19
-
-
Save akshar100/7504816 to your computer and use it in GitHub Desktop.
View Configurator is the most complex part.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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