Exception in template helper: ReferenceError: lists is not defined

Hi All,

I’m a new baby about meteor. I have one problem when trying to divide javascript file into client and server file.

When I put everything in one file it work find but when I divide into client and server file it throw error like:

Exception in template helper: ReferenceError: lists is not defined

Structure of my javscript file is:

/client/LendLibClient.js
/server/LendLibServer.js
/both/LendLib.js

And in LenLib.js I declare: var lists = new Meteor.Collection(“lists”);

But when I start meteor, it throw error message like above.

Please help me!

Thanks you very much!

Just declare it without var or it is scoped to the LendLib.js

Thank you verry much, it’s working perfect for me!