Skip to content

Commit

Permalink
fix(lazy-loading): Remove PreloadAllModules preloading strategy from …
Browse files Browse the repository at this point in the history
…routing coneiguration to make lazy-loaded modules to be actually lazy loaded :)
  • Loading branch information
christophercr committed Feb 13, 2018
1 parent de680f4 commit 9634dac
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions starter/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule, PreloadAllModules } from '@angular/router';
import { RouterModule } from '@angular/router';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

/*
Expand Down Expand Up @@ -36,7 +36,7 @@ type StoreType = {
};

/**
* `AppModule` is the main entry point into Angular2's bootstraping process
* `AppModule` is the main entry point into Angular2's bootstrapping process
*/
@NgModule({
bootstrap: [ AppComponent ],
Expand All @@ -56,8 +56,7 @@ type StoreType = {
FormsModule,
HttpClientModule,
RouterModule.forRoot(ROUTES, {
useHash: Boolean(history.pushState) === false,
preloadingStrategy: PreloadAllModules
useHash: Boolean(history.pushState) === false
}),

/**
Expand Down

0 comments on commit 9634dac

Please sign in to comment.