Why use c3ml instead of underscore for templates?

#1

c3ml provides data binding so that a user does not need to manually update dom elements:

<div class="row header">
    <div class="col-xs-12">
        <h1 class="title">
            {{ title }}
        </h1>
        <p class="subtitle">
            {{ subtitle }}
        </p>
        <div class="alert" style="display: none;" />
    </div>
</div>

h1.title will get updated automatically whenever the field “title” gets updated. Therefore, the user does not have to manipulate the dom using jQuery

0 Likes