Im getting this error:
EXCEPTION: Error in ./AppComponent class AppComponent - inline template:0:0 caused by: No provider for Router!
I had a routerLink="." attribute at one of my HTML tags which caused that error
routerLink="."
Please use this module
RouterModule.forRoot( [ { path: "", component: LoginComponent} ] )
now just replace your <login></login> with <router-outlet></router-outlet> thats it
<login></login>
<router-outlet></router-outlet>