DEV Community

Discussion on: Complex and Dynamic Form Design in Angular (Part 1 - Form Group)

Collapse
 
imben1109 profile image
Ben • Edited

All my source code put on
github.com/TechOffice/TechOffice-A...
FYR, This article would have another parts for below approach.

  • Context Service (RxJs Approach)
  • Angular Input Output Handling (Input Out Approach)
  • Angular Two Way binding Approach (Input Out Approach)
  • NgRx Store Approach (Redux Approach)

Thank a lot.

Collapse
 
anduser96 profile image
Andrei Gatej

I’ve explored a little bit the repo and I’m wondering what’s the use case for the @Host decorator?(I’m referring to this article).
I’ve read a little bit about it but I can’t really understand why you decided to use it.

Could you please elaborate on that?

Thank you!

Thread Thread
 
imben1109 profile image
Ben • Edited

You could refer to the below link for detail.
medium.com/frontend-coach/self-or-...

@host is a decorator for DI Framework in angular to guide angular component to search for expected instance to inject.

If the expected instance cannot be found in the component, it would try to find from the parent component.