We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please provide us with the following information:
Ubuntu 16.04
ng --version
node --version
angular-cli: 1.0.0-beta.11-webpack.2 node: 6.3.0 os: linux x64
Using the CLI trying lazy load routes like so:
app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule, ApplicationRef } from '@angular/core'; /* App Root */ import { AppComponent } from './app.component'; /* Feature Modules */ import { HomeModule } from './home/home.module'; import { SharedModule } from './shared/shared.module'; /* App Routing */ import { routing } from './app.routing'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, HomeModule, routing, SharedModule.forRoot() ], // entryComponents: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { }
app.routing.ts
import { Routes, RouterModule } from '@angular/router'; export const routes: Routes = [ { path: '', redirectTo: 'about', pathMatch: 'full' }, { path: 'about', loadChildren: './about/about.module' }, ];
about.module.ts
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { AboutComponent } from './about.component'; import { routing } from './about.routing'; @NgModule({ imports: [ CommonModule, routing ], declarations: [ AboutComponent ], providers: [] }) export class AboutModule { } export const routing = RouterModule.forRoot(routes);
about.routing.ts
import { Routes, RouterModule } from '@angular/router'; import { AboutComponent } from './about.component'; const routes: Routes = [ { path: '', component: AboutComponent} ]; export const routing = RouterModule.forChild(routes);
EXCEPTION: Error: Uncaught (in promise): TypeError: Cannot read property 'import' of undefined at resolvePromise (zone.js:538) at zone.js:515 at ZoneDelegate.invoke (zone.js:323) at Object.NgZoneImpl.inner.inner.fork.onInvoke (ng_zone_impl.js:53) at ZoneDelegate.invoke (zone.js:322) at Zone.run (zone.js:216) at zone.js:571 at ZoneDelegate.invokeTask (zone.js:356) at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (ng_zone_impl.js:44) at ZoneDelegate.invokeTask (zone.js:355) BrowserDomAdapter.logError @ browser_adapter.js:84 ExceptionHandler.call @ exception_handler.js:68 ngZone.onError.subscribe.next @ application_ref.js:348 schedulerFn @ async.js:89 SafeSubscriber.__tryOrUnsub @ Subscriber.js:225 SafeSubscriber.next @ Subscriber.js:174 Subscriber._next @ Subscriber.js:124 Subscriber.next @ Subscriber.js:88 Subject._finalNext @ Subject.js:128 Subject._next @ Subject.js:120 Subject.next @ Subject.js:77 EventEmitter.emit @ async.js:77 NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ ng_zone.js:124 NgZoneImpl.inner.inner.fork.onHandleError @ ng_zone_impl.js:74 ZoneDelegate.handleError @ zone.js:327 Zone.runGuarded @ zone.js:233 _loop_1 @ zone.js:487 drainMicroTaskQueue @ zone.js:494 ZoneTask.invoke @ zone.js:426
Thanks! We'll be in touch soon.
The text was updated successfully, but these errors were encountered:
Dupe of #1636
Sorry, something went wrong.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
No branches or pull requests
Ubuntu 16.04
ng --version
. If there's nothing outputted, please runin a Terminal:
node --version
and paste the result here:do on your code? etc.
Using the CLI trying lazy load routes like so:
app.module.ts
app.routing.ts
about.module.ts
about.routing.ts
more information.
The text was updated successfully, but these errors were encountered: