Markup.js
Markup.js copied to clipboard
Customization options: undefinedResult provider '???', pipeNotFound handler
It is confusing to become '???' as default result if value not found in context. My use case scenario is the next: I process templates in more steps to generate UI and documents e.g.:
- preprocessing:
- include other templates
- replace message placeholders (i18n)
- cache the preprocessed tempalte
- fill with model values
- fill the templates with model values
PS: Mark.up rocks!
i have forgotten to describe the advantage in details - but it is evident. The default undefinedResult implementation returns with ??? as otherwise would happen.
In my scenario i assign an implementation that returns with the original 'tag' which not breaks the templating in more steps.
Examples for another customization use cases:
- logging expressions that are not found in context
- default value resolving depending on context and expression
- fire event ...
Thanks for this! I'll check out ASAP.