This happens when you try to add a "routerLink" attribute to a component in Angular.
Solution
import the {RouterModule} to your module like this:
import {RouterModule} from '@angular/router';
@NgModule({
imports: [
RouterModule,
RouterModule.forChild([
{
path: '',
component: HomePage,
data: {shouldDetach: true}
},
]),
],
declarations: [
HomePage
]
})
export class HomeModule {
}