【问题标题】:Angular: ng-reflect attributes not showing in published applicationAngular:ng-reflect 属性未显示在已发布的应用程序中
【发布时间】:2021-09-26 19:40:05
【问题描述】:

我有一个带有 ASP.NET Web API 后端的 Angular 9 应用程序。

当我从 Visual Studio 运行应用程序时,我可以看到 ng-reflect-... Angular 通常在开发模式下添加到 DOM 的属性。

但是,当我使用发布应用程序时

dotnet publish --configuration Debug --output ../_Debug

我在本地运行应用程序,但看不到 ng-reflect-... 属性。

请注意,Angular 应用程序处于开发模式。它将以下内容打印到控制台:

Angular is running in the development mode. Call enableProdMode() to enable the production mode.

如何让这些属性显示在已发布的应用程序中?

【问题讨论】:

    标签: asp.net .net angular


    【解决方案1】:

    将“ng build”的“优化”参数设置为“false”。

    https://angular.io/cli/build

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-01
      相关资源
      最近更新 更多