Need Help with Routing Issue:
ERROR: Primary outlet to load 'HomeComponent' not found
Check out my package.json file :
https://i.sstatic.net/1j9tE.png
The router version being used is 3.2.0.
Here's a snippet of my app.module.ts file :
import { NgModule } from '@angular/core';
// More code here...
export class AppModule { }
In my routes.ts file :
import { ModuleWithProviders } from '@angular/core';
// More code here...
export const routing: ModuleWithProviders = RouterModule.forRoot(appRoutes);
Snippet from home.component.ts :
import { Component } from '@angular/core';
// More code here...
export class HomeComponent {
// Constructor and methods
}
In app.component.html and home.component.html, I have added :
<router-outlet></router-outlet>
I've been advised to add this deprecated code :
import { ROUTER_DIRECTIVES } from '@angular/router';
Any suggestions or solutions for my issue? Thanks in advance.