The following is an example of checking cordova plugins in $ionicPlatform.ready()a function shell:
mainApp.run(["$ionicPlatform", "$window", function ($ionicPlatform, $window) {
$ionicPlatform.ready(function () {
if ($window.plugins && $window.plugins.googleplus) {
$window.plugins.googleplus.isAvailable(
function (available) {
if (available) {
}
});
}
...
}
PS: $windowis the Angular shell forwindow
source
share