Angular2 Router: Cannot find primary outlet to load 'HomeComponent' Angular2 Router: Cannot find primary outlet to load 'HomeComponent' angular angular

Angular2 Router: Cannot find primary outlet to load 'HomeComponent'


The problem was, that due to an app loading screen, the <router-outlet></router-outlet> did not exist sometimes yet, due to a race condition. If you need to hide the html part containing the outlet, use [hidden] instead of *ngIf, to ensure the outlet is always in the DOM and not removed conditionally.