How to deal with double submit in Angular2

前端 未结 6 972
囚心锁ツ
囚心锁ツ 2021-02-02 11:30

If I click fast on my submit-button the form is submitted two or more times. My thought was to prevent this with the disabled attribute, but I need variable disableButon

6条回答
  •  一个人的身影
    2021-02-02 12:29

    If you face the double submitting, check if you do not have 2 calls to the submit method in your template. For instance it might be in your

    as well as in the submitting

提交回复
热议问题