From 0af4a8ff7c0ba8da136c22ae7db02e439b170dbf Mon Sep 17 00:00:00 2001 From: Slava Kim Date: Tue, 24 Feb 2015 10:55:43 -0800 Subject: [PATCH] Sashko's comments --- docs/client/full-api/api/templates.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/client/full-api/api/templates.md b/docs/client/full-api/api/templates.md index 761b947860..61b65ff5d8 100644 --- a/docs/client/full-api/api/templates.md +++ b/docs/client/full-api/api/templates.md @@ -45,8 +45,8 @@ Helpers can accept positional and keyword arguments: ```javascript Template.myTemplate.helpers({ - displayName: function (firstName, lastName, kw) { - var prefix = kw.hash.title ? kw.hash.title + " " : ""; + displayName: function (firstName, lastName, keyword) { + var prefix = keyword.hash.title ? keyword.hash.title + " " : ""; return prefix + firstName + " " + lastName; } }); @@ -62,9 +62,10 @@ You can learn more about arguments to helpers in [Spacebars Readme](https://atmospherejs.com/meteor/spacebars). Under the hood, each helper starts a new -[`Tracker.autorun`](#/full/tracker_autorun), when its reactive dependencies -change, the helper is rerun. Helpers depend on their data context, passed -arguments and other reactive data sources accessed during execution. +[`Tracker.autorun`](#/full/tracker_autorun). When its reactive +dependencies change, the helper is rerun. Helpers depend on their data +context, passed arguments and other reactive data sources accessed during +execution. To create a helper that can be used in any template, use [`Template.registerHelper`](#template_registerhelper).