Whether a fragment may render name under the fragments allowlist: empty allows every template; an entry ending in / allows that prefix, any other entry allows that exact name.
name
fragments
/
The allowlist (SetupOptions.fragments).
Template name.
true when name may be rendered as a fragment.
true
fragmentAllowed(['feed/', 'widgets/clock.html'], 'feed/card.html'); // truefragmentAllowed(['feed/', 'widgets/clock.html'], 'layout/shell.html'); // falsefragmentAllowed([], 'anything.html'); // true Copy
fragmentAllowed(['feed/', 'widgets/clock.html'], 'feed/card.html'); // truefragmentAllowed(['feed/', 'widgets/clock.html'], 'layout/shell.html'); // falsefragmentAllowed([], 'anything.html'); // true
Whether a fragment may render
nameunder thefragmentsallowlist: empty allows every template; an entry ending in/allows that prefix, any other entry allows that exact name.