@ManfredSteyer
Project A
Custom
Element
Custom
Element
Bundle
Project B
Slide 28
Slide 28 text
@ManfredSteyer
Create application for Custom Elements
Compile application to self contained bundle
Load bundle into consumer
3 Steps
Slide 29
Slide 29 text
@ManfredSteyer
Compile to self-contained bundle
Slide 30
Slide 30 text
@ManfredSteyer
ng add ngx-build-plus
Slide 31
Slide 31 text
@ManfredSteyer
One of the simplest bundle loaders …
const script = document.createElement('script');
script.src = 'assets/external-dashboard-tile.bundle.js';
document.body.appendChild(script);
Slide 32
Slide 32 text
@ManfredSteyer
DEMO
Slide 33
Slide 33 text
@ManfredSteyer
5) Bundle Size
Slide 34
Slide 34 text
@ManfredSteyer
Bundles
Custom Element 1 Custom Element 2
Custom Element 3
Libraries:
Angular,
RxJS,
…
Libraries:
Angular,
RxJS,
…
Slide 35
Slide 35 text
@ManfredSteyer
Angular Elements + Ivy
Custom Element 1 Custom Element 2
Custom Element 3
Slide 36
Slide 36 text
@ManfredSteyer
Where Ivy can help
✓ UI-based Widgets
✓ Libraries
Slide 37
Slide 37 text
@ManfredSteyer
Sharing Libs
Custom Element 1 Custom Element 2
Custom Element 3
Libraries:
Angular,
RxJS,
…
Drawbacks: Complexity, non-default build, …
Slide 38
Slide 38 text
@ManfredSteyer
Summary
Reuse with other technologies
Dynamically Adding
Lazy Loading
External Elements
Ivy for UI-based Code
Sharing Dependencies
Slide 39
Slide 39 text
@ManfredSteyer
Sometimes, all we
want is a greasy
pizza!
Slide 40
Slide 40 text
@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
Slide 41
Slide 41 text
@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
Slide 42
Slide 42 text
@ManfredSteyer
Contact and Downloads
[mail] [email protected]
[web] SOFTWAREarchitekt.at
[twitter] ManfredSteyer
d
http://softwarearchitekt.at/workshops
Slides & Examples