Skip to content

Instantly share code, notes, and snippets.

@tomconnors
tomconnors / gist:7423559
Last active December 28, 2015 01:49
Layout and Views
<!--Whole application shares this markup: -->
<body>
<ul id="nav">
<li>Home</li>
<li>Other Page</li>
</ul>
<div id="content"></div>
</body>
<!-- Home Page 'focus' -->
@tomconnors
tomconnors / gist:6583595
Created September 16, 2013 17:15
an alternate api for the Meteor template lifecycle
//==============================================================================
// template utilities
// making Meteor's template api a bit less, well, awful
//==============================================================================
define([
"lib/ext"
],
function(ext){
"use strict";
@tomconnors
tomconnors / gist:5861093
Last active December 18, 2015 23:19
limiting array fields on client side w/ meteor
Posts.find({}, {
fields: {
upvoters: {
$elemMatch: {
id: userId //userId is the current user's id.
}
}
}
});