I’ve got a simple initializer that injects a singleton class into views and components. When I use the component in a template like
I am then able to access the injected object from the component.
If I create an instance of the component from code:
comp = App.ComponentNameComponent.create()
the injected object is null.
Does injection only work on components added via a template? Is there something special I need to do to inject into components that I want to manage programmatically?