title: Angular routing- Apply is missing in type 'ModuleWithProviders<RouterModule>'
body: <p>This is my app.module.ts code for routing</p>
  
  <pre><code>import { BrowserModule } from '@angular/platform-browser';
  import { NgModule, Component } from '@angular/core';
  import {RouterModule,Routes, ROUTES} from '@angular/router';
  import { AppComponent } from './app.component';
  import { from } from 'rxjs';
  import {DepartmentListComponent} from './department-list/department-list.component';
  import {EmployeeListComponent} from './employee-list/employee-list.component';
   const appRoutes: Routes = [
    { path: 'department', component: DepartmentListComponent },
    { path: 'employee',      component: EmployeeListComponent },
  
  ];
  @NgModule({
    declarations: [
      AppComponent,
      RouterModule.forRoot([
        {
           path: 'new-cmp',
           component: EmployeeListComponent
        }
     ])    
    ],
    imports: [
      BrowserModule
    ],
  
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p>but i got following error.</p>
  
  <p>[ts]
  Type 'ModuleWithProviders' is not assignable to type 'any[] | Type'.
    Type 'ModuleWithProviders' is not assignable to type 'Type'.
      Property 'apply' is missing in type 'ModuleWithProviders'.
  (property) Route.component?: Type</p>