Meteor has yet another templating trick up its sleeve! In addition to custom code blocks, reactive data contexts, and all the other various template niceties, Meteor also allows you to dynamically switch between rendered templates. This recipe will show you how to dynamically render templates, using the
We will use the codebase from the Creating custom components recipe found in this chapter. Please follow that recipe first or download the corresponding codebase.
We will add a dynamic template that will switch our shapes from circles to squares, when rendered. Proceed with the following steps to use dynamic templates: