Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
angular 4部署到asp.net网站时出错_Asp.net_Angular_Web Deployment - Fatal编程技术网

angular 4部署到asp.net网站时出错

angular 4部署到asp.net网站时出错,asp.net,angular,web-deployment,Asp.net,Angular,Web Deployment,我已经成功地将angular组件构建并部署到asp.net网站中。 但问题是,如果我将代码粘贴到body标签下,它就可以正常工作。但是如果我把它粘贴到表单中,它就不起作用了 因此,这在main.master中运行良好: <body> <app-root>testtt</app-root> <script type="text/javascript" src="/scripts/inline.bundle.js"></script>

我已经成功地将angular组件构建并部署到asp.net网站中。 但问题是,如果我将代码粘贴到body标签下,它就可以正常工作。但是如果我把它粘贴到表单中,它就不起作用了

因此,这在main.master中运行良好:

<body>
  <app-root>testtt</app-root>
  <script type="text/javascript" src="/scripts/inline.bundle.js"></script>
  <script type="text/javascript" src="/scripts/polyfills.bundle.js"></script>
  <script type="text/javascript" src="/styles.bundle.js"></script>
  <script type="text/javascript" src="/scripts/vendor.bundle.js"></script>
  <script type="text/javascript" src="/scripts/main.bundle.js"></script>
最后我发现了问题所在。 不知何故,它与Ajax ScriptManager有关。 我已经在ScriptManager标记中设置了ScriptMode=“Release”,现在它可以正常工作了

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" ScriptMode="Release">


哦,谢谢!你救了我一天!这件事让我很伤心。谢谢你的解决方案。
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" ScriptMode="Release">