title: Angular 7 routes concat results in compile error
body: <p>First - FYI, the routing module is set to:</p>
  
  <pre><code>@NgModule({
    imports: [RouterModule.forRoot(ALL_ROUTES)],
    exports: [RouterModule],
    providers: []
  })
  export class AppRoutingModule {}
  </code></pre>
  
  <p>Placing all routes in 1 array named: 'ALL_ROUTES' and passing the array to the AppRoutingModule - imports: [RouterModule.forRoot(ALL_ROUTES)], works fine:</p>
  
  <pre><code>export const ALL_ROUTES: Routes = [
    {path: 'route1', component: FirstComponent},
    {path: 'route2', component: SecondComponent},
    {path: 'route3', component: ThirdComponent},
    {path: 'route4', component: FourthComponent}
  ];
  </code></pre>
  
  <p>So, the above code works fine.
  However, if we have 2 arrays and concat them like this:</p>
  
  <pre><code>export const ROUTES1: Routes = [
    {path: 'route1', component: FirstComponent},
    {path: 'route2', component: SecondComponent}
  ];
  
  export const ROUTES2: Routes = [
    {path: 'route3', component: ThirdComponent},
    {path: 'route4', component: FourthComponent}
  ];
  
  export const ALL_ROUTES: Routes = ROUTES1.concat(ROUTES2);
  </code></pre>
  
  <p>we get a compilation error:</p>
  
  <pre><code>ERROR in Cannot read property 'loadChildren' of undefined
  </code></pre>
  
  <p>Couple of similar questions have been asked here, but no resolution for this problem. Is there a possible solution? Possibly an explanation of what is going on?</p>