简体   繁体   English

打开 Angular Web 页面app-root找不到

[英]Open Angular Web Page app-root can't be found

VS 2019, building an AspNet Core application including Angular project. VS 2019,构建一个 AspNet Core 应用程序,包括 Angular 项目。 Using ng build, the client app compiles without errors.使用 ng build,客户端应用程序编译没有错误。 But, when I navigate to the page I get an error that "app-root" did not match.但是,当我导航到该页面时,我收到“app-root”不匹配的错误。

在此处输入图像描述

I've googled to no avail.我用谷歌搜索无济于事。 Somebody help me with this, please!请有人帮我解决这个问题!

Thanks谢谢

I guess your index.html does not have app-root .我猜你的index.html没有app-root Check your index.html has this element.检查你的index.html有这个元素。

index.html索引.html

<body>
  <app-root></app-root>   <!-- check your index.html has this line. -->
</body>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么Angular 2不加载默认的app-root组件? - Why Angular 2 doesn't load default app-root component? 用户百分比加载器 <app-root> 角度+2 - User percentage loader in <app-root> Angular +2 Angular 2&#39;app-root&#39;未在ExpressJS路由上加载 - Angular 2 'app-root' not loading on ExpressJS route Angular 使用 Angular 元素创建的 Web 组件覆盖 Angular ZEA89B68C34CE4A63C0FZ77E7 项目的应用根目录 - Angular Web-Component created with Angular Elements overrides app-root of the Angular Shell Project 运行时未加载angular 2 app-root - angular 2 app-root not loading when running 引导Angular5组件,因此根目录不是 <app-root> 一定 - Bootstrap Angular5 components, so the root isn't <app-root> necessarily app-root {}和app-root * {}在angular css / scss中有什么区别 - What is the difference between app-root{} and app-root * {} in angular css/scss 使用 Angular 自定义 Web 组件抛出错误:选择器“app-root”不匹配任何元素 - Using Angular custom web component throws error: The selector "app-root" did not match any elements 为什么我的Angular“ Tour of Heroes教程”没有渲染任何内容 <app-root> ? - Why isn't my Angular “Tour of Heroes tutorial” not rendering anything on <app-root>? 实施Angular Universal,我的应用程序根目录不包含任何标签 - Implementing Angular Universal and my app-root doesn't contain any tags
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM