I put my angular code in imports/client/ followed by whatever method you want to use to organize your app code. Then you just have to make sure that it gets imported somewhere (your main app.js or the main file for the angular module that this factory belongs to is a good place).
Yes, I’ve got my scripts in that folder but I think I’ve not been clear: I’m creating my app according with angular-meteor tutorial. It’s Angular 1 but I’m using components and Typescript (for future migration to Angular 2). Do you know if the best way to share this info still being the factories or may I have to use another way?
You could also use client-side collections. Where you just define a mongo (minimongo) collection only on the client and harness all of its query capabilities. I’ve found that using angular-meteor my need for factories and services is greatly reduced because of this.
Yes, I thought in that possibility as well but the use of factories is really quick to implement (and also I more used to it).
Anyway if is not a bad practique I’ll try with that.
Also, if you want to be more “Typescripty” you could define the service as a class and then use the module.service method instead of module.factory. The module.service method uses the new keyword to instantiate the service instance, i.e. it expects a class definition as its argument.