Ramco Ramco

Ramco Ramco

  • 444
  • 3.4k
  • 535.5k

[ERROR] NG8001: 'router-outlet' is not a known element:

May 16 2024 3:26 PM

Hi

   I am getting below error - 

<nav class="navbar navbar-expand-sm bg-light justify-content-center">
    <ul class="navbar-nav">
      <li class="nav-item">
        <a class="nav-link" routerlink="dashboard">Link 1</a>
      </li>
      
    </ul>
  </nav>
  
  <div class="container-fluid mt-3">
    <router-outlet></router-outlet>
  </div>

[ERROR] NG8001: 'router-outlet' is not a known element:
1. If 'router-outlet' is an Angular component, then verify that it is included in the '@Component.imports' of this component.
2. If 'router-outlet' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@Component.schemas' of this component to suppress this message. [plugin angular-compiler]

    src/app/Pages/layout/layout.component.html:16:4:
      16 ¦     <router-outlet></router-outlet>

Thanks


Answers (2)