No provider for ChildrenOutletContexts (injectionError)

To solve this problem change this line:

imports: [RouterModule.forChild(routes)],

to:

imports: [RouterModule.forRoot(routes)],

The error is caused because RouterModule.forChild() generates a module that contains the necessary directives and routes but doesn’t include the routing service. That is what RouterModule.forRoot is for: it generates a module that contains the necessary directives, routes, and the routing service.

More information in Angular docs: Angular – Router Module.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)