{"action":"created","issue":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/445","labels_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/445/comments","events_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/445/events","html_url":"https://github.com/Urigo/angular-meteor/issues/445","id":89011816,"number":445,"title":".subscribe send Array. How i can use meteor to find somethik?","user":{"login":"michalmw","id":10683327,"avatar_url":"https://avatars.githubusercontent.com/u/10683327?v=3","gravatar_id":"","url":"https://api.github.com/users/michalmw","html_url":"https://github.com/michalmw","followers_url":"https://api.github.com/users/michalmw/followers","following_url":"https://api.github.com/users/michalmw/following{/other_user}","gists_url":"https://api.github.com/users/michalmw/gists{/gist_id}","starred_url":"https://api.github.com/users/michalmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalmw/subscriptions","organizations_url":"https://api.github.com/users/michalmw/orgs","repos_url":"https://api.github.com/users/michalmw/repos","events_url":"https://api.github.com/users/michalmw/events{/privacy}","received_events_url":"https://api.github.com/users/michalmw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-17T13:06:51Z","updated_at":"2015-06-19T14:14:03Z","closed_at":null,"body":"Hello,\r\ni have array:\r\n$scope.tablica = [];\r\nWhen i push only one element to array all is ok. But if i splice or push another element have problem. Then Meteor/MongoDB callback all collecion.\r\n\r\n\r\nMy code:\r\n\r\n      $meteor.autorun($scope, function() {\r\n\r\n         $scope.wybrane = function(skladnik) {\r\n            $scope.search = '';\r\n            if ($scope.tablica.indexOf(skladnik) != -1){\r\n                var idx = $scope.tablica.indexOf(skladnik);\r\n                $scope.tablica.splice(idx, 1);\r\n            }\r\n            else\r\n                $scope.tablica.push(skladnik);\r\n\r\n            $scope.search = $scope.tablica;\r\n       \r\n            $meteor.subscribe('smoothie', {\r\n                limit: parseInt($scope.getReactively('perPage')),\r\n                skip: parseInt(($scope.getReactively('page') - 1) * parseInt($scope.getReactively('perPage'))),\r\n                sort: $scope.getReactively('sort')\r\n            }, $scope.tablica).then(function(eeee) {\r\n                console.log('eeee',eeee)\r\n                $scope.smoothieCount = $meteor.object(Counts,'numberOfParties', false);\r\n            });\r\n        }\r\n    });\r\n\r\n\r\nAnd smoothie.js\r\n```\r\n         Meteor.publish(\"smoothie\", function (options, nazwa) {\r\n                  if(nazwa.length < 1) {\r\n                  console.log('here:',nazwa);\r\n                  Counts.publish(this, 'numberOfParties', Smoothie.find({}), {noReady: true });\r\n\t\treturn Smoothie.find({}, options); \r\n\t}\r\n\telse {\r\n\t\tconsole.log('here...:', nazwa)\r\n\t Counts.publish(this, 'numberOfParties', Smoothie.find({\r\n\t \t'skladniki' : {'$in': nazwa}\r\n }), {noReady: true });\r\n\treturn Smoothie.find({\r\n\t\t'skladniki' : {'$in': nazwa}\r\n\t}, options); \r\n\t}\r\n                  });\r\n```\r\n\r\n\r\nsmoothie.ng.html\r\n```\r\n <li dir-paginate=\"smothie in smoothie | itemsPerPage: perPage\" total-items=\"smoothieCount.count\">\r\n      <a href=\"/skladniki/{{skladnik._id}}\">{{smothie.nazwa}}</a>\r\n      <p>{{smothie.opis}}</p>\r\n      <ul>\r\n      \t<li ng-repeat=\"skladnik in smothie.skladniki\">\r\n      \t\t{{skladnik}}\r\n      \t</li>\r\n      </ul>\r\n      <button ng-click=\"remove(skladnik)\">X</button>\r\n    </li>\r\n    <dir-pagination-controls on-page-change=\"pageChanged(newPageNumber)\"></dir-pagination-controls>\r\n```"},"comment":{"url":"https://api.github.com/repos/Urigo/angular-meteor/issues/comments/113527551","html_url":"https://github.com/Urigo/angular-meteor/issues/445#issuecomment-113527551","issue_url":"https://api.github.com/repos/Urigo/angular-meteor/issues/445","id":113527551,"user":{"login":"michalmw","id":10683327,"avatar_url":"https://avatars.githubusercontent.com/u/10683327?v=3","gravatar_id":"","url":"https://api.github.com/users/michalmw","html_url":"https://github.com/michalmw","followers_url":"https://api.github.com/users/michalmw/followers","following_url":"https://api.github.com/users/michalmw/following{/other_user}","gists_url":"https://api.github.com/users/michalmw/gists{/gist_id}","starred_url":"https://api.github.com/users/michalmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalmw/subscriptions","organizations_url":"https://api.github.com/users/michalmw/orgs","repos_url":"https://api.github.com/users/michalmw/repos","events_url":"https://api.github.com/users/michalmw/events{/privacy}","received_events_url":"https://api.github.com/users/michalmw/received_events","type":"User","site_admin":false},"created_at":"2015-06-19T14:14:03Z","updated_at":"2015-06-19T14:14:03Z","body":"@Urigo or someone? Can help?"}}