I’m trying to figure out how to resolve states in uiRouter in angular.
Right now I want to resolve the state when a collection from mongo is in scope.
What I’ve done is the following:
resolve: {
organization: function ($meteor) {
return $meteor.subscribe('currentOrganization').then(function () {
return Organizations.findOne();
});
}
}
But from what I’ve read is that $meteor
is deprecated.
but if I use Meteor.subscribe
the state never resolves.
Is it safe to use $meteor.subscribe
?