Is there a way to detect that the ionic serve CLI works (and then not on a real device) in the program and uses it as a conditional.
My problem: I have a Cordova plugin that sends a response to Cordoba.
When I used Ripple, he suggested choosing a callback value to send back to JavaScript (to emulate the result of the plugin).
I notice that Ionic2 does not do this when I launch the browser. Therefore, in order to facilitate the work of my developer and to give the opportunity to test it in a browser (and not build on a real device all the time), I would like to be able to check the program if the CLI ionic serve works. In other words: check if it works on a real device or in a regular browser .
If it works in a browser, I used a hint to ask the user to enter a dummy value for the result of the Cordova plugin instead of the real Cordova plugin.
angular cordova typescript ionic2 ionic3
nyluje
source share