diff --git a/docs/client/api.html b/docs/client/api.html index edd31ccc43..a5561cf88f 100644 --- a/docs/client/api.html +++ b/docs/client/api.html @@ -947,12 +947,33 @@ Example:

Templates

+{{> api_box tmpldecl}} + +A template that you declare as `<{{! }}template name="foo"> ... ` +can be accessed as the function `Template.foo`. + +XXX Describe `data` arg, calling it to get HTML. Each template may have many +occurrences (/instances/invocations) on the page. There are callbacks and +directives you can specify on a template declaration that apply to all +instances of the template. Templates have a life cycle. There are template +instance objects. + {{> api_box tmpldecl_rendered}} {{> api_box tmpldecl_created}} {{> api_box tmpldecl_destroyed}} +* XXX bind, preserve, events, helpers, ... +* XXX Template instance object +* XXX constant +* XXX link to Handlebars wiki page? +* XXX Remove Meteor.ui.render, all references +* XXX Add Meteor.render, Meteor.renderList +* XXX Create Spark-only wiki page +* XXX Mention Spark in template docs? +* XXX Find home for all relevant material on New Template API wiki page +

Meteor.ui

`Meteor.ui` provides building blocks for creating reactive UIs out of strings of diff --git a/docs/client/api.js b/docs/client/api.js index 3a2407da91..716e4d1816 100644 --- a/docs/client/api.js +++ b/docs/client/api.js @@ -828,6 +828,13 @@ Template.api.http_del = { descr: ["Send an HTTP DELETE request. Equivalent to `Meteor.http.call(\"DELETE\", ...)`. (Named `del` to avoid conflict with JavaScript's `delete`."] }; +Template.api.tmpldecl = { + id: "tmpldecl", + name: "Template.myTemplate([data])", + locus: "Client", + descr: ["Access a template function by name."] +}; + Template.api.tmpldecl_rendered = { id: "tmpldecl_rendered", name: "Template.myTemplate.rendered = function ( ) { ... }", diff --git a/docs/client/docs.js b/docs/client/docs.js index 9ee9e6a872..93d8878e6e 100644 --- a/docs/client/docs.js +++ b/docs/client/docs.js @@ -145,12 +145,11 @@ var toc = [ ], {name: "Templates", id: "templates_api"}, [ - {prefix: "Template", instance: "myTemplate", - name: "rendered", id: "tmpldecl_rendered"}, - {prefix: "Template", instance: "myTemplate", - name: "created", id: "tmpldecl_created"}, - {prefix: "Template", instance: "myTemplate", - name: "destroyed", id: "tmpldecl_destroyed"} + {prefix: "Template", instance: "myTemplate", id: "tmpldecl"}, [ + {name: "rendered", id: "tmpldecl_rendered"}, + {name: "created", id: "tmpldecl_created"}, + {name: "destroyed", id: "tmpldecl_destroyed"} + ] ], "Meteor.ui", [