You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Why?: The usage of forwardRef indicates either a cyclic dependency or inconsistency in the services' declaration (i.e. the dependent service is declared before its dependency). In both cases there is usually a better approach to be used.
One place where forwardRef seems necessary is when components need to provide value accessors, e.g. for custom form controls. An example can be found in md-checkbox which provides a ControlValueAccessor so it can be used similar to a native checkbox. I'm not sure if there's been a better solution implemented since this code was written though.
Reacted by Andrew Kamarouski, Nedorot, Ruslan Arkhipau, Aleš, Sam Jones, JK, Piotr Żurek, Krystian Pudlik, Gamunu Balagalla, Aleksei Egorov and 4 more
Activity
traviskaufman commentedon May 6, 2016
One place where
forwardRefseems necessary is when components need to provide value accessors, e.g. for custom form controls. An example can be found in md-checkbox which provides aControlValueAccessorso it can be used similar to a native checkbox. I'm not sure if there's been a better solution implemented since this code was written though.opporancisis commentedon May 8, 2017
Hi guys. Has anybody come up with how to make custom form controls without using
forwardRef?meriturva commentedon Jun 28, 2017
No solution here with Angular 4.
@opporancisis did you find one?