User Platform variable inside @App providers section


#1

I want to inject a specific class per platform, so inside my providers list under @App component I use the ‘useFactory’ pattern of angular2. I want to check there the platform and return specific implementation according to the running platform. The problem is I can’t inject/use the ionic Platform variable inside the useFactory method.

There is any way to work with Platform object inside App providers logic?