Template is loading before the reponse of meteor method/subscription


#1

I’m using angular1. html template is loading before the response from the meteor method/subscription which failing to attach the response to scope.

below is the code

Meteor.subscribe(‘getPartners’, ‘country’, ‘’, {}, { “companyInfo.country”: 1 }, 2, 0, {
onReady: function () {
$scope.partners = Partners.find({}).fetch();
},
onStop: function (error) {
console.log(error);
return error;
}
});

so partners object is undefined in the template file.

Can anyone help me to sort the issue out