Comments (7)
The work around that I'm using is to use the selector parameter of the $collection initializer, as documented at http://angularjs.meteor.com/api/collection. I pass the exact parameters to that as I am to the publisher, and the subset is returned as expected.
I don't know if there are performance implications by doing it this way, as I haven't examined the code to see where the request is run, but at least it's a work around.
from angular-meteor.
Looks like the work around isn't so great. Trying to update a collection bound in this way just leads to the document being deleted rather than updated.
from angular-meteor.
@sheppe I've just tested the subscribe parameter and it works..
Can you add a MeteorPad and maybe I can help more?
Maybe you are subscribing in another place to the same collection?
Remember, Meteor aggregates all the information from the collection that got to the client at any point in time so all the information might be coming from another subscription in your code.
Another thing is to check is you removed the autopublish package..
from angular-meteor.
It's a little too complex for a meteor pad, but clearly I'm doing something wrong.
I only reference the publishers in one controller, but there are three different publishers referencing a single collection in that controller. Each publisher returns a different subset of results, but all of them together would end up returning everything as I have been experiencing.
Is it possible an interaction between the three publishers on a single collection is causing this? I did reduce the number of binds in the controller to use just one publisher, and it still returned all documents.
I do reference the base collection/all documents in a different view and controller. Are you saying that the publishers will not return a properly filtered set of results doing it that way? I'm fairly new to Meteor, so perhaps I've made a rookie mistake here.
Lastly, I do have autopublish removed. :)
Thanks!
from angular-meteor.
@sheppe exactly, the publish/subscribe mechanism is not for filtering, filtering is does on the collection (or inside the publish Method).
We are working now on adding filtering + sorting + pagination to the tutorial using this library:
https://github.com/matteodem/meteor-easy-search
Reading that library might help you better understand how it works
from angular-meteor.
@Urigo Okay, thanks.
For now I've just implemented custom Angular filters to display the subsets of data, and to keep the data manageable I'm using the pagination feature of $collection.bind.
Thanks for taking on this project, by the way. Angular and Meteor are two of my favourite frameworks, and combining them is brilliant!
from angular-meteor.
Great.
I've added a note in the documentation of $collection.bind about the subscribe parameters thanks to your issue
from angular-meteor.
Related Issues (20)
- ReferenceError: angular is not defined
- Typescript compiler adds arrow function in web.browser.legacy js file causing error on IE11
- Angular Meteor Universal w/ AOT questions HOT 3
- Angular Meteor Universal w/ AOT config
- Problem when compiling project with MeteorCLI
- meteor build mobile app failed File to read not found or unreadable: HOT 1
- Infinite render loop for applications without a <base>
- Using angular-meteor with Meteor 1.8.2 HOT 3
- angular-meteor with Meteor 1.8.2 and ng-table
- HTML optimization during build process HOT 4
- upgrade to Meteor 1.9 fails HOT 19
- Error while compiling in AOT mode with Angular 9 HOT 15
- Client compiling twice every change/build HOT 2
- Upgrade to Meteor 1.10 fails HOT 2
- Bare example fails (with minor tweak) when upgraded to Meteor 1.8.2 HOT 2
- Server Side Rendering(SSR) in Angular CLI + Meteor project
- Testing your template :p
- Error: Cannot find module '/imports/app/app.module'
- `AOT=1 meteor` broken for Angular versions ≥ 13 HOT 3
- Are there any plans to upgrade this project to Angular 17?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-meteor.