I’m trying to retrieve some Platform information in a service, and it does not appear that we can just inject the Platform into a service but only the App, or maybe I’m wrong?
So instead I’ve decided to publish an event when the platform is ready, and I will listen to this event in my service, however it seems that when my service is instantiated, the event has already been published and therefore I never receive it. So 2 questions:
Is there any way to get the Platform outside of the @App ?
If not, am I forced to create a service that references the Platform or can I subscribe to an event after it has been published?
But I m stuck, i have the following error:
uncaught Cannot resolve all parameters for ‘Platform’(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that ‘Platform’ is decorated with Injectable.
Platform is not injectable.
Someone know how to use Platform in an injectable service?
reflective_provider.js:232
Uncaught Cannot resolve all parameters for ‘User’(LocalDataBase, Platform, undefined). Make sure that all the parameters are decorated with Inject or have valid type annotations and that ‘User’ is decorated with Injectable.