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 http://ngcordova.com/docs/install/?
Because $cordovaStatusbar is the syntax for this plugin only if you use ngCordova http://ngcordova.com/docs/plugins/statusbar/

You are right.

I solved it by installing ‘ngCordova’:

bower install ngCordova --save

1 Like

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

1 Like

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.

grrrr!!

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