Skip to content

Commit

Permalink
chore(angular-standalone): add preloading strategy (#1842)
Browse files Browse the repository at this point in the history
Co-authored-by: Sean Perkins <13732623+sean-perkins@users.noreply.github.com>
  • Loading branch information
luisbytes and sean-perkins committed Jun 6, 2024
1 parent cbbca9f commit 4bf4fe2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions angular-standalone/base/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { enableProdMode } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { RouteReuseStrategy, provideRouter } from '@angular/router';
import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';

import { routes } from './app/app.routes';
Expand All @@ -15,6 +15,6 @@ bootstrapApplication(AppComponent, {
providers: [
{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
provideIonicAngular(),
provideRouter(routes),
provideRouter(routes, withPreloading(PreloadAllModules)),
],
});

0 comments on commit 4bf4fe2

Please sign in to comment.