-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angularneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given
Milestone
Description
Bug Report or Feature Request (mark with an x)
[x ] bug report
Versions.
Angular CLI: 1.5.0
Node: 6.9.1
OS: darwin x64
Repro steps.
When compiling an app AOT, modules that are loaded using a function for loadChildren do not get compiled properly. We need this functionality to properly load routes from modules. We cannot use the lazy load string syntax because these modules exist as packages in the node_module folders and lazy loaded routes inside of a node module package are not supported by the CLI yet.
export function loadChildModule() {
return ChildModule;
}
export const routes: Routes = [
{
path: '',
component: ParentComponent,
children: [
{
path: '',
loadChildren: loadChildModule
}
]
}
];
@NgModule({
imports: [
RouterModule.forChild(routes)
],
exports: [
RouterModule
]
})
export class AppRoutingModule { }
The log given by the failure.
vendor.bf2a9d83f92ee4918125.bundle.js:1 ERROR Error: Uncaught (in promise): Error: Runtime compiler is not loaded
Error: Runtime compiler is not loaded
at J (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at t.compileModuleAsync (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.project (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._tryNext (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._next (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.T14+.e.next (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._subscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.t._trySubscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.t.subscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at t.call (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at J (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at t.compileModuleAsync (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.project (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._tryNext (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._next (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.T14+.e.next (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e._subscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.t._trySubscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at e.t.subscribe (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at t.call (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at c (polyfills.f5c660f62615965d5e39.bundle.js:1)
at c (polyfills.f5c660f62615965d5e39.bundle.js:1)
at polyfills.f5c660f62615965d5e39.bundle.js:1
at t.invokeTask (polyfills.f5c660f62615965d5e39.bundle.js:1)
at Object.onInvokeTask (vendor.bf2a9d83f92ee4918125.bundle.js:1)
at t.invokeTask (polyfills.f5c660f62615965d5e39.bundle.js:1)
at r.runTask (polyfills.f5c660f62615965d5e39.bundle.js:1)
at o (polyfills.f5c660f62615965d5e39.bundle.js:1)
at <anonymous>
Desired functionality.
This should properly compile the modules returned by the factory function.
jbojcic1, keatkeat87, lautarobock, bruiztorres, aider and 1 more
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angularneeds: repro stepsWe cannot reproduce the issue with the information givenWe cannot reproduce the issue with the information given