I ran into an issue today working on my private mobile project. My challenge is pretty straightforward but I cannot seem to find a solution for it. Here it goes:

I am using Dependency Injection to inject a service into my models in an ionic2 application and have a need to access one of those services in a static method. I have done this several times in Java using spring framework, with spring, all we need to do is to get the application context and get the service from it.

Is there a way to get that working in ionic and typescript? I am new to javascript and angular world but I believe there should be something similar. Please forgive my indulgence and any help would definitely be appreciated.

I followed this example Asynchronous form validation but tried to remove static from all those methods but that too did not work. It seems as if there is some kind of phase issues with form validation and services in model class.