angular.js - 我该怎么写这个delete函数呢? 我现在写成这样了,但是只能删除页面的item,不能把删除的部分传给服务器
天蓬老师
天蓬老师 2017-05-15 17:02:37
0
3
549


这个是delete函数

天蓬老师
天蓬老师

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

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