Skip to content

Live (self updating) templates for your Backbone.Extended views with a handlebars + ractive inspired declarative syntax

License

Notifications You must be signed in to change notification settings

steve8708/Backbone.Extended.liveTemplates

Repository files navigation

Backbone.Extended.liveTemplates

Ultra lightweight and high performance self updating templates for Backbone! Hot dayamn

Inspired by angular, handlebars, and ractive.

  <!-- DOM updates automatically as models and collections change -->
  <div id="main" role="main">
    <ul>
      {{#each person in people }}
        <li>{{ person.name }}</li>
      {{/each}}
    </ul>
    <div class="{{ showExtraInfo ? 'active' : 'hidden' }} extra-info-container">
      Hello {{ user.name ? user.name : 'Anonymous' }}!

      {{#if user.isLoggedIn() }}
        <div class="info"> Thanks for logging in!</div>

        {{#each onlineFriend in filterOnline( user.friends ) }}
          <div class="online-friend">
            <img src="{{ onlineFriend.profileImage }}" class="online-riend">
            <span class="online-friend-name">
              {{ onlineFriend.name || 'anonymous' }}
            </span>
          </div>
        {{/each}}
      {{/if}}

      {{#if user.type == 'brand' && user.subscriptionLevel == 'premium'}}
        Thank you for being a premium brand!
      {{/if}}
    </div>
  </div>

Documentation coming soon...

About

Live (self updating) templates for your Backbone.Extended views with a handlebars + ractive inspired declarative syntax

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages