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
Web Components with Angular Elements: Beyond th...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Manfred Steyer
PRO
May 01, 2019
Programming
1.2k
2
Share
Web Components with Angular Elements: Beyond the Basics @ngconf 2019
Manfred Steyer
PRO
May 01, 2019
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
40
Agentic AI & UI: Arcitecture, HITL, Emerging Standards
manfredsteyer
PRO
0
37
Agentic UI Requires Standards: AG-UI, A2UI, and MCP Apps Work Together @Angular London
manfredsteyer
PRO
1
36
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
97
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
AWSコミュニティ活動は顧客のクラウド推進に効くのか / Do AWS community activities help customers adopt the cloud?
seike460
PRO
0
170
AgentCore Optimizationを始めよう!
licux
3
200
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
500
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
210
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
1
130
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.5k
書籍「ユーザーストーリーマッピング」が私のバイブル
asumikam
4
480
「Linuxサーバー構築標準教科書」を読んでみた #ツナギメオフライン.7
akase244
0
1.4k
AI-DLC Deep Dive
yuukiyo
9
5.6k
The Less-Told Story of Socket Timeouts
coe401_
3
970
属人化しないコード品質の作り方_2026.04.07.pdf
muraaano
0
310
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
150
Featured
See All Featured
Building an army of robots
kneath
306
46k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.6k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
290
Prompt Engineering for Job Search
mfonobong
0
290
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
170
4 Signs Your Business is Dying
shpigford
187
22k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Accessibility Awareness
sabderemane
1
110
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
250
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
The Limits of Empathy - UXLibs8
cassininazir
1
320
Transcript
@ManfredSteyer Web Components with Angular Elements: Beyond the Basics Manfred
Steyer SOFTWAREarchitekt.at ManfredSteyer
@ManfredSteyer
@ManfredSteyer [Igor Minar, Angular Connect 2018 Keynote]
@ManfredSteyer
@ManfredSteyer Angular Elements
@ManfredSteyer Custom Elements: Framework independent components
@ManfredSteyer Possibilities Component Libraries Enriching existing Apps CMS Integration Dynamic
Loading
@ManfredSteyer Contents • Basics (just one slide) • Dynamically adding
elements • Lazy loading elements • External elements • Bundle Size
@ManfredSteyer About me … • Manfred Steyer SOFTWAREarchitekt.at • Angular
Trainings and Consultancy • Google Developer Expert (GDE) • Angular Trusted Collaborator Page ▪ 9 Manfred Steyer Public: Vienna, Munich, Frankfurt In-House: Everywhere in Europe http://www.softwarearchitekt.at/workshops
@ManfredSteyer 1) Basics
@ManfredSteyer Angular Elements Wrap Angular Components: createCustomElement(…) Register it with
browser: customElements.define(…)
@ManfredSteyer 2) Dynamic Elements
@ManfredSteyer Adding Custom Elements dynamically const tile = document.createElement('dashboard-tile');
@ManfredSteyer Adding Custom Elements dynamically const tile = document.createElement('dashboard-tile‘); tile['prop']
= 123; tile.setAttribute('class', 'col-lg-4 col-md-3 col-sm-2') tile.addEventListener([…])
@ManfredSteyer Adding Custom Elements dynamically const tile = document.createElement('dashboard-tile'); tile['prop']
= 123; tile.setAttribute('class', 'col-lg-4 col-md-3 col-sm-2') tile.addEventListener([…]) otherElement.appendChild(tile); Angular uses Domino to simulate document for SSR!
@ManfredSteyer DEMO
@ManfredSteyer 3) Lazy Loading
@ManfredSteyer 2 Steps for Lazy Elements Register module in angular.json
Load with with NgModuleFactoryLoader
@ManfredSteyer Register in angular.json "lazyModules": [ "[…]/lazy-dashboard-tile.module" ],
@ManfredSteyer Loading your module @Injectable({ providedIn: 'root' }) export class
LazyDashboardTileService { }
@ManfredSteyer Loading your module @Injectable({ providedIn: 'root' }) export class
LazyDashboardTileService { constructor( private loader: NgModuleFactoryLoader, private injector: Injector ) {} }
@ManfredSteyer Loading your module @Injectable({ providedIn: 'root' }) export class
LazyDashboardTileService { constructor( private loader: NgModuleFactoryLoader, private injector: Injector ) {} load(): Promise<void> { const path = '[…]/lazy-dashboard-tile.module‘; […] } }
@ManfredSteyer Loading your module @Injectable({ providedIn: 'root' }) export class
LazyDashboardTileService { constructor( private loader: NgModuleFactoryLoader, private injector: Injector ) {} load(): Promise<void> { const path = '[…]/lazy-dashboard-tile.module'; return this.loader.load(path).then(moduleFactory => { }); } }
@ManfredSteyer Loading your module @Injectable({ providedIn: 'root' }) export class
LazyDashboardTileService { constructor( private loader: NgModuleFactoryLoader, private injector: Injector ) {} load(): Promise<void> { const path = '[…]/lazy-dashboard-tile.module'; return this.loader.load(path).then(moduleFactory => { moduleFactory.create(this.injector); }); } }
@ManfredSteyer DEMO
@ManfredSteyer 4) External Elements
@ManfredSteyer Project A Custom Element Custom Element Bundle Project B
@ManfredSteyer Create application for Custom Elements Compile application to self
contained bundle Load bundle into consumer 3 Steps
@ManfredSteyer Compile to self-contained bundle
@ManfredSteyer ng add ngx-build-plus
@ManfredSteyer One of the simplest bundle loaders … const script
= document.createElement('script'); script.src = 'assets/external-dashboard-tile.bundle.js'; document.body.appendChild(script);
@ManfredSteyer DEMO
@ManfredSteyer 5) Bundle Size
@ManfredSteyer Bundles Custom Element 1 Custom Element 2 Custom Element
3 Libraries: Angular, RxJS, … Libraries: Angular, RxJS, …
@ManfredSteyer Angular Elements + Ivy Custom Element 1 Custom Element
2 Custom Element 3
@ManfredSteyer Where Ivy can help ✓ UI-based Widgets ✓ Libraries
@ManfredSteyer Sharing Libs Custom Element 1 Custom Element 2 Custom
Element 3 Libraries: Angular, RxJS, … Drawbacks: Complexity, non-default build, …
@ManfredSteyer Summary Reuse with other technologies Dynamically Adding Lazy Loading
External Elements Ivy for UI-based Code Sharing Dependencies
@ManfredSteyer Sometimes, all we want is a greasy pizza!
@ManfredSteyer Blog > SOFTWAREarchitekt.at • Angular Elements, Part I: A
Dynamic Dashboard In Four Steps With Web Components […] • Angular Elements, Part V: Your Options For Building Angular Elements With The CLI
@ManfredSteyer Workshop: Tomorrow A Deep Look at Angular Elements With
live coding and exercises for you on StackBlitz Thu, May 2:30 pm - 4:30 pm
@ManfredSteyer Contact and Downloads [mail]
[email protected]
[web] SOFTWAREarchitekt.at [twitter] ManfredSteyer
d http://softwarearchitekt.at/workshops Slides & Examples