Text bindingsΒΆ

It’s a way to draw information to DOM:

<div>Hello {{name}}!</div>
<a href="htp://example.com/{{link}}>link</a>

Also you can use method “bind once” for optimization, for that you should append “=” to begin of expression.

<div>Hello {{=name}}!</div>
<a href="htp://example.com/{{=link}}>link</a>

Also you can use one time binding

If you can’t use tags {{ }}, you can change this to {# #}, {< >}, ## ## or something like this, length of tags should be equal 2 symbols:

alight.utils.pars_start_tag = '{#';
alight.utils.pars_finish_tag = '#}';

For complex text bindings you can use text directives

comments powered by Disqus