Angular $http POST to target=“_blank”

后端 未结 1 662
北荒
北荒 2021-01-02 17:58

I need to make a POST from Angular to a URL ./makeFile.php which will create a file with contents from a database query based on the information pr

相关标签:
1条回答
  • 2021-01-02 18:03

    I had similar issue, and I couldn't do with with $http. So I programatically created html form with method="post" and target="_blank". And I placed hidden elements with data I needed to send. After I submitted that form I removed it from dom.

    Let me know if you find another solution, using $http.

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