Individual declarations in merged declaration 'DepartmentListComponent' must be all exported or all local.ts(2395) Routing components
You are exporting DepartmentListComponent
in this file which is imported in the same file module locally.
When we import
and export
same module in same file, this error is thrown.
Checkout the all imports and make sure that those are not exported from same file.
Same problem here with even stranger resolution:Remove the export line (last line).Compile (normally without errors)Add the last line again.Compile...Done.Don't ask me why. I am also a starter learning typescript and Angular along the way ;-)