Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Lazy Loading und Preloading mit Angular, Präse...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Manfred Steyer
PRO
November 26, 2016
Programming
270
0
Share
Lazy Loading und Preloading mit Angular, Präsentation von ngGraz, November 2016
Manfred Steyer
PRO
November 26, 2016
More Decks by Manfred Steyer
See All by Manfred Steyer
Agentic AI in the Frontend: Architectures with Open Standards @iJS London 2026
manfredsteyer
PRO
0
43
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
39
Agentic UI Requires Standards: AG-UI, A2UI, and MCP Apps Work Together @Angular London
manfredsteyer
PRO
1
38
Signal Forms: Beyond the Basics @ngBelgrade 2026
manfredsteyer
PRO
0
120
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
99
Rethinking Angular: The Future with Signal Store and the New Resource API @JAX 2024 in Mainz
manfredsteyer
PRO
0
62
Agentic UI with Angular @ngAir April 2025
manfredsteyer
PRO
0
180
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
340
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
200
Other Decks in Programming
See All in Programming
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
490
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
360
いつか誰かが、と思っていた フロントエンド刷新5年間の実践知
kiichisugihara
1
260
cloudnative conference 2026 flyle
azihsoyn
0
110
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
450
when storing skills in S3 file
watany
3
1.3k
PHPでローカル環境用のSSL/TLS証明書を発行することはできるのか? #phpconkagawa
akase244
0
340
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
320
Surviving Black Friday: 329 billion requests with Falcon!
ioquatix
0
2.8k
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
4
1.4k
tRPCの概要と少しだけパフォーマンス
misoton665
2
260
Featured
See All Featured
Evolving SEO for Evolving Search Engines
ryanjones
0
190
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
220
Tell your own story through comics
letsgokoyo
1
910
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
160
Rails Girls Zürich Keynote
gr2m
96
14k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.5k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
How to build a perfect <img>
jonoalderson
1
5.5k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Transcript
Lazy Loading und Preloading mit Angular 2 Manfred Steyer
About me … • Manfred Steyer • SOFTWAREarchitekt.at • Trainer
& Consultant • Focus: Angular • Google Developer Expert Page 2 Manfred Steyer
Inhalt • Lazy Loading • Preloading • Nutzung von Shared
Modules Page 3
Lazy Loading Page 4
Modul-Struktur Page 5 AppModule … … … SharedModule Root
Module Feature Modules Shared Module
Root Module mit Lazy Loading Page 6 const APP_ROUTE_CONFIG:
Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'flights', loadChildren: './[…]flight-booking.module#FlightBookingModule' } ];
Routen für Feature Module Page 7 const FLUG_ROUTES =
[ { path: '', component: FlugBuchenComponent, […] }, […] }
Konfiguration von Webpack • angular2-router-loader • Splittet Bundle in mehrere
Teile Page 8
DEMO Page 9
Preloading Page 10
Idee • Eventuell später benötigte Module werden nach (!) Anwendungsstart
geladen • Wird das Modul später tatsächlich benötigt, steht es augenblicklich zur Verfügung Page 11
Preloading aktivieren Page 12 export const AppRoutesModule = RouterModule.forRoot(
ROUTE_CONFIG, { preloadingStrategy: PreloadAllModules });
DEMO Page 13
Lazy Loading und Shared Services Page 14
DEMO Page 15
Lazy Loading und Shared Modules Page 16 AppModule FlugModule
SharedModule includes includes (lazy) includes
Lazy Loading und Shared Modules Page 17 AppModule FlugModule
SharedModule includes includes (lazy) includes AuthService AuthService
Lösung Page 18 AppModule FlugModule SharedModule includes (inkl. Provider)
includes (lazy) includes (exkl. Provider) AuthService
Shared Module Page 19 @NgModule({ […], providers: [] })
export class SharedModule { }
Shared Module Page 20 @NgModule({ […], providers: [] })
export class SharedModule { static forRoot(): ModuleWithProviders { return { ngModule: SharedModule, providers: [AuthService, […]] } } }
DEMO Page 21
Zusammenfassung Page 22 Lazy Loading von Modulen webpack splittet
Bundle Preloading Strategy Shared Modules mit und ohne Provider
Kontakt [mail]
[email protected]
[blog] SOFTWAREarchitekt.at [twitter] ManfredSteyer