AngularJs ui doesn't update after crud operations with NodeJs

AngularJs ui doesn't update after crud operations with NodeJs

I'm trying to build a simple CRUD app for managing employees tasks with AngularJs MongoDb ,and NodeJs. For some reason the scope variables doesn't update when doing CRUD operations, with $http requests from angular to node.

I'm trying to build a simple CRUD app for managing employees tasks with AngularJs MongoDb ,and NodeJs. For some reason the scope variables doesn't update when doing CRUD operations, with $http requests from angular to node.

First i get the Tasks list by using :

 $http.get("http://localhost:3000/employees-tasks")
    .success(function (response) {
      $scope.arrEmployeesTasks = response;
    });

Suppose i want to delete employee's task - i'm using the following functions:

AngularJs:

 $scope.deleteTask = function (prmTaskObj) {

$http.delete("http://localhost:3000/delete-task?_id=" + prmTaskObj._id).success(function (response) { console.log(response); });

Node Js

exports.delete = (req, res) => {

Tasks.findByIdAndRemove(req.query._id) .then(task => { if(!task) { return res.status(404).send({ message: "task not found with id " + req.query._id }); } res.send({message: "task deleted successfully!"}); }).catch(err => { if(err.kind === 'ObjectId' || err.name === 'NotFound') { return res.status(404).send({ message: "task not found with id " + req.query._id });
} return res.status(500).send({ message: "Could not delete task with id " + req.query._id }); }); };

It's important to add that the CRUD operations works...but i can't get the $scope.arrEmployeesTasks variable to update accordingly in the UI.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Angular 8 Node & Express JS File Upload

In this Angular 8 and Node.js tutorial, we are going to look at how to upload files on the Node server. To create Angular image upload component, we will be using Angular 8 front-end framework along with ng2-file-upload NPM package; It’s an easy to use Angular directives for uploading the files.

How to Implement Server Side Pagination with Angular 8 and Node.js

A simple example of how to implement server-side pagination in Angular 8 with a Node.js backend API.

Difference between Node.js and React.js and Angular.js

AngularJS turned the whole definition of web development through its existence, what was lacking in previous methods of development was inappropriate structure. It merges use of JavaScript with MVC and HTML with DOM. ReactJS is a JavaScript library and has a view, but lacks model & controller components. React introduced the concept of virtual DOM which is regarded as one of the greatest advantages of React in comparison of AngularJS. Node.js is a JavaScript-based platform used for developing real-time network applications like a chat software.