Skip to content

Instantly share code, notes, and snippets.

@possibilities
Forked from Mas-Tool/RoomList.html
Created June 2, 2012 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save possibilities/2859926 to your computer and use it in GitHub Desktop.
Save possibilities/2859926 to your computer and use it in GitHub Desktop.
MasTool help please.
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>
Template.RoomsTemplate.rooms=function()
{
return Chatrooms.find();
}
function InitRoomList()
{
var tabs=$("#tabs");
Meteor.ui.chunk(function(){
var rooms = Chatrooms.find();
return Template.RoomListTemplate({ rooms: rooms });
});
$("#tabs").append(roomsTemplate);
$("#tabs").tabs("add","#roomList","rooms");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment