I need to retrieve a specific field from the users collections, How can I get it just like the way I can get the _id from an user with Meteor.userId() function ?
I nee to know so I can resolve routes from angular.
$stateProvider.state('mystate', {
resolve: {
adminUser($q) {
//so I can resolve a route in angular like this
if (user.isAdmin) {
return $q.resolve();
} else {
return $q.reject();
}
}
}
I would appreciate any help, and any recommendation if it is a better way to achieve the same result