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
It's an intended behavior. Decorators used on properties like Constant/Value/Inject are filed by the injector service after the construtor. All props are filled before the $onInit hook.
If you need settings on constructor just inject the Configuration service:
Information
When using
@Constant
or@Value
to inject the configuration into a client/service, the value isundefined
inside the constructor.Example
For example, I have
In the example above, when the app boots, the constructor prints
undefined
but when I calldoSomething()
the config value exists. How come?Acceptance criteria
The text was updated successfully, but these errors were encountered: