title: Individual declarations in merged declaration 'DepartmentListComponent' must be all exported or all local.ts(2395) Routing components
body: <p>I have a problem with this code, I do it exactly like the video tutorial (I'm learning), but it doesn't work and calls for some declarations. It is possible that the code written in the guide is in some older methodology? Its hard code without service.</p>
  
  <p>app-routing.module.ts</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { Routes, RouterModule } from '@angular/router';
  import { DepartmentListComponent } from './department-list/department-list.component';
  import { EmployeeListComponent } from './employee-list/employee-list.component';
  
  
  const routes: Routes = [
    { path: 'departments', component: DepartmentListComponent },
    { path: 'employees', component: EmployeeListComponent }
  
  ];
  
  @NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
  })
  export class AppRoutingModule { }
  export const routingComponents  [DepartmentListComponent, EmployeeListComponent ]
  </code></pre>
  
  <p>app.module.ts</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule } from '@angular/core';
  
  import { AppRoutingModule, routingComponents } from './app-routing.module';
  import { AppComponent } from './app.component';
  
  
  @NgModule({
    declarations: [
      AppComponent,
      routingComponents
    ],
    imports: [
      BrowserModule,
      AppRoutingModule
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>app.component.html</p>
  
  <pre><code>&lt;h1&gt; Welocme in routing&lt;/h1&gt;
  
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  </code></pre>
  
  <p>I need to see running application with changing urls form <a href="http://localhost:4200/employees" rel="noreferrer">http://localhost:4200/employees</a> and <a href="http://localhost:4200/departments" rel="noreferrer">http://localhost:4200/departments</a>.
  I am begginer so please be understanding.</p>