Skip to content

Commit

Permalink
{{rt}} and {{svc}} template variable aliases
Browse files Browse the repository at this point in the history
{{router_info.base_url}} and {{app_config.store.service}}, respectively
  • Loading branch information
sheppard committed Jun 2, 2015
1 parent bb4508e commit c500cee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions js/wq/app.js
Expand Up @@ -94,6 +94,7 @@ app.init = function(config) {
tmpl.init(config.template);
tmpl.setDefault('native', app['native']);
tmpl.setDefault('app_config', app.config);
tmpl.setDefault('svc', app.service);

// Option to submit forms in the background rather than wait for each post
var seconds;
Expand Down
1 change: 1 addition & 0 deletions js/wq/router.js
Expand Up @@ -206,6 +206,7 @@ function _updateInfo(path) {
router.info.full_path_enc = escape(router.info.full_path);
router.info.params = router.getParams(path);
tmpl.setDefault('router_info', router.info);
tmpl.setDefault('rt', router.info.base_url);
// Compatibility with older templates
tmpl.setDefault('pages_info', router.info);
}
Expand Down

0 comments on commit c500cee

Please sign in to comment.