my page http: // localhost:4200 load correctly, but when i want to go to the link http: // localhost: 4200 /login it return to the link http: // localhost: 4200 and show error.<
This is because you are declaring routes in the app.module.ts as well as routing-module.module.ts. Declare all your routes in the routing module instead. You can use @angular/cli to generate your routing module so it's created with a better name. If you create it using cli commands, set the name as routing as Angular will already add module for you. explicity adding module to your name will give you the redudant Module word in your class name (RoutingModuleModule).
Remove the routes created in your app.module.ts and import RoutingModule (or RoutingModuleModule in your case)
imports: [
BrowserModule,
RoutingModuleModule
]
Move the route from your app.module.ts to your routing.module.ts
const routes: Routes = [
{ path: '' , redirectTo: '/task', pathMatch: 'full' }
{ path: 'login', component: LoginComponent },
{ path: 'task' , component: TaskManagerComponent }
];