Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

159
Views
cannot find primary outlet to load Component

I am using Angular 4 project and I have used ngSwitch to switch multiple layouts based on condition. So, at this time, I am getting error cannot find primary outlet to load Component. It is because of router-outlet but what is the best way to solve this ?

Code :

<div [ngSwitch]="isAuthenticated()">
  <div *ngSwitchCase="true">
    <div id="wrapper">
      <navbar></navbar>
      <div class="gray-bg">
        <router-outlet></router-outlet>
        <footer></footer>
      </div>
    </div>
  </div>
  <div *ngSwitchCase="false">
    <div class="blue">
      <router-outlet></router-outlet>
      <footer></footer>
    </div>
  </div>
</div>
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!