Skip to content

Instantly share code, notes, and snippets.

@coryhouse
Created February 3, 2015 14:04
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 coryhouse/7334587ca39f67dc34d4 to your computer and use it in GitHub Desktop.
Save coryhouse/7334587ca39f67dc34d4 to your computer and use it in GitHub Desktop.
//user.js
define([], function () {
var cart = require('cart'); //using this style to work around circular reference
var numItemsInCart = cart.items.length;
//logic to initialize user's cart icon continues here...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment