当前位置: 代码迷 >> 综合 >> angular报错信息之 The selector app did not match any elements
  详细解决方案

angular报错信息之 The selector app did not match any elements

热度:25   发布时间:2023-12-25 21:24:14.0

angular报错信息之

The selector "app" did not match any elements //选择器“app”与任何元素都不匹配
Unhandled Promise rejection: The selector "app" did not match any elements ; Zone: <root> ; Task: Promise.then ; Value: Error: The selector "app" did not match any elements
//未处理的承诺拒绝:选择器“app”不匹配任何元素;区域:<root>;任务:promise.then;值:错误:选择器“app”不匹配任何元素

当前错误原因是我们绑定在页面上的选择器不正确,

AppComponent_Host.ngfactory.js? [sm]:1 ERROR Error: The selector "app" did not match any elements
    at DefaultDomRenderer2.selectRootElement (vendor.js:115586)
    at DebugRenderer2.selectRootElement (vendor.js:67167)
    at createElement (vendor.js:62443)
    at createViewNodes (vendor.js:65581)
    at createRootView (vendor.js:65497)
    at callWithDebugContext (vendor.js:66985)
   
  相关解决方案