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
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










