Microsoft Edge adds parameters after navigating to a route on angular 2

后端 未结 1 1790
清歌不尽
清歌不尽 2020-12-15 11:58

I have a form being filled in two steps, the first form fills in the main part of an object and the second, the sub-part. There is a method that navigates back from form2 to

相关标签:
1条回答
  • 2020-12-15 12:28

    To fix this problem, add type="button" to the button tag. Edge is apparently assuming that any button without an explicit type is type="submit", for which it is posting the values in the form.

    I had explicitly included the form tag in my page so that I could access the form properties in the .ts code. I removed that form tag and associated code, and the navigation works in Edge. So Edge seems to be assuming that my button was a submit button. After including type="button" in the button attributes, I was able to put the form tag back in, and it all still worked.

    0 讨论(0)
提交回复
热议问题