window.localStorage;
//set something to localStorage
window.localStorage.cart = JSON.stringify(["1","2"]);
window.localStorage.userName = "JimBob";
//get from localStorage
var cartArray = JSON.parse(window.localStorage.cart);
//assuming a template called addButtonTemplate exists in the DOM
//register a partial before calling a template where it is used
Handlebars.registerPartial('addButton', $('#addButtonTemplate').html());
//Using a partial in a template
//append a '>' character before the partial name
<div class="likeButton" data-item-id="{{id}}">
{{#if inCart}}
{{> removeButton}}
{{else}}
{{> addButton}}
{{/if}}
</div>