Notes on AngularJS and Mongoose working together