Too much junk in your Angular components? Try composition instead of inheritance! @JoshuaMorony
Too much junk in your Angular components? Try composition instead of inheritance!  @JoshuaMorony
Uploaded January 2022 | Updated September 2026, 2 weeks ago
My modern Angular course: angularstart.com

In this video, we take a look at how to keep your components DRY (Don't Repeat Yourself) by using both an inheritance pattern and a composition pattern with services.

Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076

Learn Angular with Ionic: ionicstart.com

Source code:
ORIGINAL: github.com/joshuamorony/composition-vs-inheritance
INHERITANCE: github.com/joshuamorony/composition-vs-inheritance/tree/inheritance
COMPOSITION 1: github.com/joshuamorony/composition-vs-inheritance/tree/service-composition-one
COMPOSITION 2: github.com/joshuamorony/composition-vs-inheritance/tree/service-composition-two

More resources:
- Dependency Inversion: en.wikipedia.org/wiki/Dependency_inversion_principle
- Introduce Inheritance & Object Composition: medium.com/cp-massive-programming/inheritance-object-composition-84c9539eeaf9
- Code Reuse in Angular with Object Composition & Inheritance: medium.com/cp-massive-programming/code-reuse-in-angular-with-object-composition-inheritance-c7194631e522

0:00 Introduction
1:49 Inheritance
4:08 Composition vs Inheritance
5:13 Composition
9:34 Conclusion

#angular #ionic #architecture

- More tutorials: eliteionic.com
- Follow me on Twitter: twitter.com/joshuamorony
Too much junk in your Angular components? Try composition instead of inheritance!I didnt know about FLASH in neovim (kinda mad about it)Testing SMART components and SERVICES with Signals and RxJSMaking Angulars resource() even more powerfulHow Electron jailbreaks your web applicationThis is what your Ionic app looks like on NxA hidden side benefit of DECLARATIVE codeWhat most devs dont get about declarative code (I didnt either)WEB WORKERS made my code over 100x faster (almost ZERO blocking time)I finished my 3D Angular + Signals gameThe easier way to code Angular appsWhy use OnPush in Angular? Not for performance...
Joshua Morony |

Too much junk in your Angular components? Try composition instead of inheritance!

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER