-
Notifications
You must be signed in to change notification settings - Fork 2
Template
Guy Paterson-Jones edited this page Feb 4, 2015
·
2 revisions
Zygo uses a Handlebars template to render your app on the server. The default template can be found here - if you wish to customise it, I'd recommend you use this as a base to avoid headache.
The template essentially loads system.js
, loads your package's config.js
, creates a div for the app to be rendered into (__zygo-body-container__
) and finally initialises the zygo client. The following properties are passed into the template by the zygo server:
-
cssTrace
: A list of paths to css files required by the rendered component. -
bundles
: Thebundles.json
data, if the server is running in a production environment. -
component
: The HTML of the rendered component. -
routes
: Theroutes.json
data. -
context
: The global context object populated by the matched routes' handlers. -
path
: The path of the matched route. -
baseURL
: The url System.baseURL should be set to in order to find packages. -
meta
: Alias forcontext.meta
- metadata populated by the handlers, such asmeta.title
. -
addLinkHandlers
: Alias for theanchors
property inzygo.json
. Whether to wrap anchor tags as route changes.