I'm trying create ionic app project with ngCordova plugin progress indicator, but it doesn't works. Somone know How to do to make it work ?
angular.module('starter')
.controller('MyController',
function ($scope,$ionicPlatform, $state, $cordovaProgress, PopupService, $cordovaCamera) {
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
}
$scope.login = function()
{
$cordovaProgress.showDeterminateWithLabel(true, 50000, "Loading");
}
If we look at the official ngCordova documentation found here:
http://ngcordova.com/docs/plugins/progressIndicator/
It says that it works for Android and iOS, however as of right now, this is not true.
Let's dig a big deeper.
ngCordova is just a wrapper for Apache Cordova plugins, so if we visit the plugin developers page found here:
http://paolobernasconi.com/cordova-progressIndicator/
It says that only iOS is supported and Android is coming soon. However, this is not entirely true either. I personally made a revision to ngCordova found here:
https://github.com/driftyco/ng-cordova/commit/67f5f0dd2359aee3e53b0adf91c2f6c0d2c30854
The only Android ProgressIndicator commands are show
and hide
.
Example:
$cordovaProgress.show(message)
This might change in the future (or already has?), but as of right now there are plenty of iOS commands for ProgressIndicator, but only two for Android.
I suggest tracking the module to see if it changes since it is still alpha.
Regards,