Template rendering syntax sugar for Real using Comps
Noti: Requires version of Real since
1.5.0
Install:
npm install comps-real-addons --save
Set custom tag:
var comps = require('comps')
var compsRealAddons = require('comps-real-addons')
compsRealAddons(comps)
-
{%= $expression /%}
Will be compiled to real's r-text directive:
<span r-text>{$expression}</span>
-
{%if= $expression /%}
Will be compiled to real's r-text directive with r-if:
<span r-if="{$expression}" r-text>{$expression}</span>
-
{%- $expression /%}
Will be compiled to real's r-html directive:
<span r-html>{$expression}</span>