Ionic2: 'ionic serve -l' not functioning correctly

Please help!

I am facing a problem solely with ionic 2 (version 1 runs fine)

when i try to run: ionic serve -c -l

  • it opens the browser and starts lab (after i remove ‘ionic’ from scripts{} in package.json)
  • but it does not include cordova.js :

1 553472 warn Native: tried calling StatusBar.styleDefault, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
2 553473 warn Native: tried calling Splashscreen.hide, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

if this happens because i am not running app on ios or android,but on linux browser, than how ionic 1 handles this situtation on the same linux??

if you run serve -c -l in ionic 1, lab will show you both, android and ios native look & feel.

P.S. I am using @ionic 2.1.8 and cordova 6.4.0

thanks a lot

you can’t load cordova in the browser. Those warnings only point that out, don’t worry about it if everything works.