~/talk

Who needs Inheritance and composition

Talkat angularday 2021 · on Friday, 2021-11-12· [angular, frontend-architecture]
name:Kate Sky
links:none on file
slides:none on file

Argues for composition over inheritance and shows three concrete directives that replace component flags and duplicated logic: a renewal badge using Renderer2 to add classes and text, a structural settings directive using TemplateRef and ViewContainerRef, and a permission-by-selection directive with getter/setter inputs. Uses HostBinding/HostListener, async service calls (promises) and ngrx as an alternative, tests with mocked services and waitForAsync where specs pass, code generated with ng generate and published in separate repo branches.

AI-written summary · about

  1. 0:00Start
  2. 5:34Duplicating Code
  3. 7:50Why We Will Favor of Composition over Inheritance
  4. 17:36How To Change Styles on a Directive
  5. 19:44Host Binding
  6. 20:15Testing the Directive
  7. 23:50Creating a Directive
  8. 27:47Template Ref
  9. 42:34Has Inheritance Impact on the Final Bundle Size
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.