Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 780 Bytes

README.md

File metadata and controls

40 lines (34 loc) · 780 Bytes

Lets you easily include Riot components in Meteor templates. Pass the component class through the component argument.

Demo

Code

Examples: Your riotjs tag component

<todo>
  <h3>{ opts.title }</h3>
  <h3>{ opts.books }</h3>
</todo>
<template name="Home">
 {{#if Template.subscriptionsReady}}
  <div>
      {{> Riot component="todo" title="Hello papa" books=books}}
    </div>
  {{else}}
    <div class="loading">Loading ... </div>
  {{/if}}
</template>
Template['Home'].rendered = function(){
    var instance = this;
  instance.subscribe('books');
  
}
Template['Home'].helpers({
  books: function(){
    return 'books';
  }
})