Meteor where to define my collection?

meteor

Solution

Do not use var unless you want it private to that file.

Albums = new Meteor.Collection("Albums");

Problem

I have a pretty simple app structure that contain those libs `server` - contain some configuration for routing and ENV `client` - contain templates (`<template name=".*"></template>`) & JS File for every template `collections` now inside collections i have file called "Albums.js" and has a pretty simple content `var Albums = new Meteor.Collection("Albums");` now inside my client folder i'm trying to access to this variable `Albums` and i'm get undefined error. my target is to take data from `form` and pass it to `collection.insert`

Original source