Brandon Brown
03/24/2023, 2:39 PMinit
method. I was hoping to be able to extend
the child component from the parent and just call the methods directly but the dependencies in the child component don't seem to get injected. I know the simple workaround is to just inject the child component instead but is there any way to use inheritance instead?bdw429s
03/24/2023, 2:41 PMbdw429s
03/24/2023, 2:42 PMbdw429s
03/24/2023, 2:42 PMonDIComplete()
method which won't be run until all the injections are finishedbdw429s
03/24/2023, 2:42 PMBrandon Brown
03/24/2023, 2:44 PMbdw429s
03/24/2023, 2:44 PMbdw429s
03/24/2023, 2:45 PMbdw429s
03/24/2023, 2:45 PMbdw429s
03/24/2023, 2:46 PMbdw429s
03/24/2023, 2:47 PMbdw429s
03/24/2023, 2:47 PMproperty name="thing-I-want" inject;
and you're done šBrandon Brown
03/24/2023, 2:47 PMBrandon Brown
03/24/2023, 2:48 PMBrandon Brown
03/24/2023, 2:48 PMBrandon Brown
03/24/2023, 2:50 PMbdw429s
03/24/2023, 2:52 PMthreadSafe
annotationbdw429s
03/24/2023, 2:52 PMbdw429s
03/24/2023, 2:53 PMryan
03/24/2023, 3:29 PMinit()
, then you might be able to make it work with inheritance by including super.init()
into your component's init()
that is doing the inheritance.
This should call the base component's init()
within the init()
essentially. I believe that would allow for the base component dependencies to be utilized in the methods of "inheritor" component.