Cordova plugin issues in ionic serve


I have created mobile app using ionic framework, AngularJS, cordova plugins and other stuffs.
When I run ionic serve command, it shows cordova plugin is undefined error.
For example, I have used network plugin of cordova : ""
For this, when I run ionic app on browser, it shows “Cannot read property ‘connection’ of undefined” error when I test these things :


var networkState =;

Am I making some mistake or cordova plugins are not supported on desktop browser using ionic serve?
If not, then Is there any way so we can run app with cordova plugin on Desktop browser (using $ionic serve command)?
Because I like the speed of changes made on device browser. It’s just awesomely instant.

For all other commands : $ionic run ios or $ionic emulate ios, we have to wait a lot.
Please help.



I had a similar problem with the ngCordova Sqlite plugin, ionic serve does not work as you need all the cordova libraries (js and java) as built when you build the android, ios, or other application. try running it in one of your simulators e.g. ionic run android.