dongtangu6889 2019-07-04 08:28
浏览 78

如何在点击删除时执行模态应该特别删除该数据。

I have Tried calling it,but i don't know to pass the actual data is not getting it is reflecting me undefined.what should i do for passing the data from one component to another page modal component.

I have a crud application where i click on the delete button and it should reflect me a modal, in which i want to ensure delete or not ,while clicking on delete it should delete the data specific.

stackblitz.com/edit/angular-orasdfsdfbr4d

while clicking on delete button after confirmation it should delete.and getting error of the undefined id.

  • 写回答

2条回答 默认 最新

  • douyan1970 2019-07-04 08:50
    关注

    When an expected modal is to be opened, you should always check the id or data-target of the button of the delete.

    If you're using tables or data table, most likely the ids do not match the modal target.

    If it is component issue pls, upload what have you done so far.

    UPDATE:

    If the id is undefined (based on my experience), you can save the id in a service to be deleted, to save its state. If this is not the problem, then the mapping of your id to be passed has some issues.

    评论

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 shape_predictor_68_face_landmarks.dat
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料