Conformance Examples 0.1.0 — Partials: inline-partials¶
inline-partial-defines-and-is-used-in-the-same-block¶
An {{#inline name }} block defines a partial body directly usable by a {{> name }} reference in the same block, with no loader entry for that name.
Template
Partials
Output
inline-partial-is-visible-before-its-own-definition¶
Because the whole block is scanned for inline definitions before any segment renders, a {{> name }} reference textually before its {{#inline name }} definition still resolves (hoisting), matching Handlebars' decorator pre-pass.
Template
Partials
Output
inline-partial-renders-with-no-loader-registered¶
An inline partial resolves and renders even when no onLoadPartial loader is registered at all (the fixture's partials map is omitted): the hard NoPartialLoader failure only fires when a static key matches neither an inline definition nor a loader.
Template
Output
inline-partial-shadows-a-loader-provided-partial-of-the-same-name¶
When an in-scope inline definition and a loader-resolvable key share a name, the inline definition wins; the loader is never consulted.
Template
Partials
label:
Output
inline-partial-is-visible-to-a-loaded-partial-invoked-from-the-same-block¶
Block scoping propagates into an invoked loaded partial: the shared RenderContext registry is not reset at partial boundaries, so a {{> label }} reference inside the loaded 'outer' partial resolves the inline 'label' defined in the block that invoked 'outer'.
Template
Partials
outer:
Output
inline-partial-defined-inside-a-block-is-out-of-scope-after-that-block¶
An inline definition inside a {{#with}} block is visible for the duration of that block, but out of scope once rendering leaves it; a subsequent {{> label }} reference at the outer level falls through to the loader instead.
Template
Context
Partials
label:
Output
dynamic-key-resolves-against-the-inline-scope¶
A dynamic {{> (expr) }} key is resolved against the inline scope exactly like a static key: the loader lookup that would otherwise run for the resolved key string is skipped once an inline definition matches.
Template
Context
Partials
Output
Source fixture: partials/inline-partials.json