Let me preface by saying I'm fairly new to Node and Angular.
I have two models, one for items, and another for users. My items model has an "owner" attribute which is the id of the user which created it. I have a angular controller for handling the items. In the items controller, I would like to create a function which accepts a user id and returns the associated username. Now, I have tried doing this two ways. One was making the list of users as resource and passing it to the items controller. I have also tried adding this code to the users server route and adding a corresponding $http.get in the user controller.
app.route('/users/:userId')
.get(users.read);
app.param('userId', users.userByID);
I'm not sure which approach I should be using, and I run into trouble as soon as I attempt to ng-repeat the items in the view corresponding to the items controller, while calling my function on every "owner" attribute. I have been binding my data to $scope.ownerName. Thanks for any advice.