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
That is expected, private fields cannot be decorated by design. However, you can try to create a getter and decorate that. (I haven’t tried it myself, but the spec allows it)
@attilaorosz - this is not true. It used to work in earlier versions. Started to acting up around 0.8.0. Currently with 0.10.0 I find, that @Inject() works in one place in code and fails in others. Calling container directly via Container.get in the same place works with no issue.
This used to work but doesn't anymore with 0.10.0:
I was trying to...
inject a private property:
The problem:
I'm getting the TypeScript error: "Decorators are not valid here"
The text was updated successfully, but these errors were encountered: