Modernizing Large Frontends with Web Components
summary
Web Components act as an incremental migration path: write Angular components, turn them into Angular Elements with createCustomElement and customElements.define, bundle via Angular CLI (use ngx-build-plus to produce a single bundle), inject polyfills and the script into the AngularJS index.html, and replace leaf components one by one. Shared state uses vanilla JS singletons wrapped for Angular and AngularJS; watch polyfills, change‑detection coupling, and routing. This approach suits very large, high‑complexity apps and avoids a full rewrite.
AI-written summary · about
chapters (38)
- 0:00Intro
- 2:49Choosing the right path is critical.
- 5:08Modern Frontends
- 5:48Single Page Applications (SPAs)
- 6:25DOM Manipulation
- 9:35What are Web Components?
- 10:03Use Cases
- 10:15Micro Frontends
- 10:56Shared Components
- 12:52Anatomy of a Custom Element
- 13:12Selector String
- 13:24JavaScript Class
- 13:38Options Object
- 14:55Bells & Whistles
- 15:19Lifecycle Methods
- 16:55HTML Templates
- 17:38It's complicated...
- 18:33Custom Element Libraries
- 20:26Stencil
- 22:07Modernization
- 25:35Why Angular Elements?
- 28:30Tightly Coupled
- 28:42Dependency Injection
- 31:48The Elements Upgrade Strategy
- 32:04Set Up Bottom-up components Create vanilla j5 services with wrappers Convert routing and remove Elements
- 33:03Setting Up Angular Elements
- 35:51Add Angular Elements
- 38:39Upgrading Components
- 41:14AngularJS 1.7+ Helpers
- 41:28ng-custom-element
- 46:22Tip: Group into Modules
- 46:38Sharing Data with Services
- 47:13Off-Roading with JS
- 47:31Wrap Shared JS Services
- 49:53Inputs & Outputs
- 51:39Wrapping Up the Upgrade
- 52:10Switch Routing
- 52:27Drop Elements
related talks
54mMicro Frontends with Angular Elements and Web Components — A Perfect Combination?
19mWeb Components with Angular Elements: Beyond the Basics
40mAngular, React, Vue and Co. – peacefully united thanks to Web Components and Micro Apps
28mAngular and Webcomponents
25mI'm with Web Components and Web Components Are with Me
25mWeb components with Angular: The what, the why and the how.
34mWeb Components & Micro Apps: Angular, React & Vue peacefully united?
05mMigrating a Portfolio of Front-End Apps to Angular
