angular.js - How do I write this delete function? I've written it like this now, but I can only delete the items on the page, but I can't send the deleted part to the server.
天蓬老师
天蓬老师 2017-05-15 17:02:37
0
3
582


This is the delete function

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
Peter_Zhu

Thanks for the invitation, but I really don’t understand what your problem is?

"Write a delete function"? Haven't you already written it?

"He did not delete the data on the server side", then you should look at how your IntentServ.delete method is implemented, whether the backend receives the parameters correctly and whether the backend reports an error! ?

You probably don’t lack this function, but you don’t know whether this function is working properly! ?

巴扎黑

First of all, the data you see is obtained from the backend, that is to say, it is useless for you to just operate the foreground data, that is, you need to transfer the data you have completed to the backend and save it (to the database, etc.), so , you should pass the ID or other unique identifier of the data that needs to be deleted to the background, let the background perform the deletion operation, and then re-obtain the data after the operation is completed~ Such a process.

左手右手慢动作

Your front-end controller and service seem to be written correctly. It may be that the parameters are not matched or the server is not working well. You can run Delete Service in Postman first. If it works, the parameters are wrong. You can just ask the server directly how to adjust the interface to delete it.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template