Version: v0.6.1 - Beta.  We welcome contributors & feedback.  THanks!

Meta.noTemplateMode

Meta.noTemplateMode()

Description

Trigger an exception if the current function was called from a template.

This is to enforce a separation of view logic from back-end logic.

bodyHtml(); //= ERROR

template bodyHtml() {
    {{ $data = getData() }}
}

function getData() {
    Meta.noTemplateMode();
}