Keeping Templates Up-to-Date Edit Page
In order to know which part of your HTML to update when an underlying property changes, Handlebars will insert marker elements with a unique ID. If you look at your application while it's running, you might notice these extra elements:
1 2 3 4 |
My new car is <script id="metamorph-0-start" type="text/x-placeholder"></script> blue <script id="metamorph-0-end" type="text/x-placeholder"></script>. |
Because all Handlebars expressions are wrapped in these markers, make sure each HTML tag stays inside the same block. For example, you shouldn't do this:
If you want to avoid your property output getting wrapped in these markers, use the unbound
helper:
Your output will be free of markers, but be careful, because the output won't be automatically updated!
1 |
My new car is blue. |