Search Posts

Category: mongodb

Jhipster pagination count issue

I am having issues with pagination in jhipster, the X-Total-Count is not correct, Everytime total-count gets returned is as same as the size that I send to the api, I even tried logging the page.getTotalCount and it also returns the same value as size that I send from frontend, I am not sure what happened to the project, cause everything was working properly before, I am using jhipster 4.1, mongodb is my database and angular […]

how to join out side variable in nested element of database table in laravel using mongodb?

how to join out side variable in nested element of database table in laravel using mongodb? table name:abc_tbl: { _id : 59bf784682956df00c00002q, data : [{ is_active : true, reletion : 2, user_id : 59bf784682956df00c00002a }, { is_active : true, reletion : 2, user_id : 5a04005482956d9c2b000029 }], } click: Source: AngularJS

Rails angularjs : Not accessin the dabatabase

My Angular controller is not accessing the database. I am working with the action ‘index’ for testing purposes. It does display the angular view but with no information. I am manually typing: localhost:3000/tickets/index to test if it works. I have a small personal project, which I developed in rails. Now I am trying to gradually change the front-end to Angularjs. I have a model $ controller working on Rails “PrintingTicket”. Because I don’t want to […]

AngularJs promise not refreshing after data update

I need update a document using angular and mongodb. The update function(“vm.UpdateItem”) is working well. My problem is how to refresh the view after the update. To do it, I click a button and call a promise in “vm.UpdateItem()” to update the document. When the promise returns I can check the returned data were updated. After that, I reload the data from server with “loadFilaLists” function, but the data is not showing updated. If I […]

How to unset a field in Mongoose with findByIdAndUpdate [duplicate]

This question already has an answer here: Mongoose overwrite the document rather that `$set` fields 2 answers I use MEAN stack. On my backend I use findByIdAndUpdate function in Mongoose to do the update operation in CRUD. I also use Bootstrap UI date picker. On “clearing” of the date, uib-datepicker-popup resets the scope value for the date field to undefined. Now I pass the scope resource object into Mongoose with a HTTP PUT angular $resource […]

Angular ToDo App [on hold]

I am learning Angular, so I am trying to fully develop an Angular ToDo App that enables users to create, update and delete tasks, saving them into a Mongo database. The app is making progress, the angular logic works in the browser memory but I am having a hard time making it work with my Mongo database. Right now I can insert data into it through the “Create” state, but I can’t figure out how […]

How can I create a feed filtered based on what a user is "following" in angularjs?

I have a collection of discussions, each with a “userId” property. I also have a collection of users, each with an array property, “following”, that stores multiple userIds. I want to create a list of discussions based on the userIds stored in the “following” array. The list should only include discussions where the userId matches a userId in the “following” array. my html: <div ng-repeat=”discussion in discussions”> <span>{{}}</span> </div> my controller: app.controller(‘FeedCtrl’, function($scope, $http) { […]

Join 2 webservices in client side or server side

I am working as service developer. My web-service have support 2 method: get a student by student id and get class by student id. Web UI actually need a data that is a student with class information embedded in. So I need to query student by id then keep in student variable, then query class by student id then classbyStudent. Then try to embed the class variable to the student variable. So Where I should […]

MEAN stack: first object pushed into MongoDB schema’s array causes RangeError

edit: I have realized that this is hanging at the line “res.json(comment);” of my angular-ui-route. Still not sure why. I’m following through the tutorial here: This may be related to the fact that the tutorial is a little outdated. I’ve uploaded my code in it’s current state to It’s a simple reddit clone web app for posting links, comments, and upvoting them. I am getting a “RangeError: Maximum call stack size exceeded” error […]

Next Page »