Yeah, namspacing is good but we have requried, we shouldn't need to bind it
to window. To use backpain, you do var Backpain = require('backpain') and
get the handle that way, regardless of where.


On Mon, Oct 28, 2013 at 11:37 AM, Jason Ho <notifications@github.com> wrote:

> In src/js/main.js:
>
> >
> > -        Backpain.initialize();
> > +        window.Backpain = Backpain;
> >      });
>
> This follows the App.* pattern I saw in some backbone google projects and
> rendr airbnb. The global Backpain is the naming space to allow sharing
> things across routes/views without passing references around. In this
> example if we require ('backpain/app') we will gain access to the namespace
> and can access anything inside it like the router or views or models.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/WiserTogether/backpain/pull/2/files#r7251844>
> .
>



-- 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -

Erik LaBianca -  CTO - WiserTogether Inc. | 202-503-3751

For timely health content, "Like" us on Facebook at
http://www.facebook.com/mywiserhealth