我面临的情况是,我必须向客户提供我的网络应用程序的链接,他们将把表单发布到我的网页上。该应用程序是在 Angular 5 上创建的。我一直在谷歌上搜索;但没有找到解决方案。我希望你们中的任何人都可以帮助我。
<form action="http://localhost:4200/#/activateaccount" >
<input type='Hidden' name='loginId' value='<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="fd9c958e9c93d3948c9f9c91bd9c9f9ed39e92d38896" rel="noreferrer noopener nofollow">[email protected]</a>'/>
<input type="submit" value="Submit">
</form>
提交代码将是这样的。在实际操作中,该链接是我的 Angular 5 应用程序的链接。可以发布到 Anuglar 5 页面吗?
不过,提前致谢。
最佳答案
Post 请求发送到服务器,Angular 不会看到它,因为它在客户端运行。您可以发布到应用程序的index.html,但我怀疑这就是您想要的。
您想要的是可以接受 http post 的 REST API 端点。
查看
关于angular - 发布到 Angular 4/5 页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50455352/