Skip to content

Instantly share code, notes, and snippets.

View possibilities's full-sized avatar

Mike Bannister possibilities

View GitHub Profile
if (Meteor.is_client) {
Template.beastie.resultOfSabatage = function () {
return Session.get('resultOfSabatage');
};
var handleResults = function(err, result) {
if (err) {
Session.set('resultOfSabatage', 'Failure! (' + err.error + ')');
} else {
Session.set('resultOfSabatage', 'Success!');
<template name='store'>
{{#each items}}
{{> item}}
{{/each}}
</template>
<template name='item'>
{{name}} {{qty store}}
</template>
// Blue theme
<template name="blueTheme">
{{> blueWidget}}
{{> anotherBlueWidget}}
</template>
<template name="blueWidget">
<span class="blue"></span>
</template>
$('#page').empty().append($(Meteor.ui.render(function() {
Meteor.defer(function() {
// Stuff you wanna do when this thing gets redrawn
});
return page();
})));
@possibilities
possibilities / RoomList.html
Created June 2, 2012 20:53 — forked from Mas-Tool/RoomList.html
MasTool help please.
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>
<head>
<title>render-test</title>
</head>
<body>
</body>
<template name="roomList">
<div id="roomList">
<ul>
@possibilities
possibilities / RoomList.html
Created June 2, 2012 22:00 — forked from Mas-Tool/RoomList.html
MasTool help please.
<template name="RoomListTemplate">
<div id="roomList">
<ul>
{{#each rooms}}
<li>{{name}}</li>
{{/each}}
</ul>
</div>
</template>
if (Meteor.is_client) {
Chatrooms = new Meteor.Collection('chatRooms');
Meteor.subscribe('chatRooms');
var rooms = Chatrooms.find();
Meteor.startup(function() {
var roomResults = Meteor.ui.render(function() {
<body>
{{#routeIs "home"}}
{{> home}}
{{else}}
{{> kitchenSink}}
{{/routeIs}}
</body>
new Demo({
hosts: {
production: ['forms.meteor.com']
},
github: {
user: 'possibilities',
repo: 'meteor-forms'
}
});