Before we get too far down this road, IMHO pages should not be interacting with the network, period. That should all be isolated to services. And it would be fantastic if even services didn’t have this sort of conditional twiddling.
Can you try rearchitecting things so that:
-
SelectionService.getSelections()
takes no parameters, so that it works exactly the same regardless if it’s on mobile or not - Internally,
SelectionService
uses Angular’sHttpClient
only - no arcane plugins -
SelectionService
never checks what platform it’s running on