Components inheritance | Learn Angular

Since Angular 2.3, we can use Components inheritance. The feature improve code reusability and desgin of our applications. This feature covers all of the following :

  • Metadata : You can herit of parent properties or override them. So, we can inherit from @NgModule, @Host, @Self @SkipSelf, @Inject, @Optionnal, @Attribute, @ContentChild, @ContetnChildren, @ViewChild … and lot of them.
  • Constructor : As with the ES6, you can use the super() constructor
  • LifeCycle : You can also herit of parent lifeCycle.

Laisser un commentaire