Ionic $cordovaStatusbar


I have already the status bar plugin: cordova plugin add org.apache.cordova.statusbar
However, when I inject it:

.run(function($ionicPlatform, $cordovaStatusbar)

It says: Uncaught Error: [$injector:unpr] Unknown provider: $cordovaStatusbarProvider <- $cordovaStatusbar

What is it?


Do you also have ngCordova
Because $cordovaStatusbar is the syntax for this plugin only if you use ngCordova


You are right.

I solved it by installing ‘ngCordova’:

bower install ngCordova --save


It’s supposed to work with Ionic.Native as well, this is an error


I have the same error, I am trying to migrate from ngCordova to Ionic.Native…so I removed ngCordova from my app.

Can you help please ?


Ok in case it can help others:
ngCordova uses : $cordovaStatusbar

while ionic.Native uses $cordovaStatusBar with a capital B.


And in case you were using $ with ngCordova, this function doesn’t exist anymore, you need to use : $cordovaStatusBar.styleLightContent() instead.