how get static method of service
- leonardoap
- Member | 17
hi there, how can i get static method of presenter by example:
my config.neon
and when i try to inject into my presenter with
the browser show me the next error
- Filip Procházka
- Moderator | 4668
You can't actually. You can configure the DI to push somewhere result of some method call using neon configuration. But you can't require result of some method call.
This will configure the service to contain the result of the method call in the property, once it's created by the DI Container.
And why is it static? Please don't try to create any new model/service locators inside the container. Simply register all the services you're going to be using and then explicitly require them in your class.
Like this
and get it injected using property injection in presenters
or constructor injection in bussines logic classes
Last edited by Filip Procházka (2015-02-05 18:45)