$cordovaFile method does nothing when called?
问题 I'm trying to use the ngCordova plugins in my Ionic app, but I can't seem to get them working properly. Here is my Controller : .controller('InspectionCtrl', ['$scope', '$stateParams', '$cordovaDevice', '$ionicPlatform', '$cordovaFile', function($scope, $stateParams, $cordovaDevice, $ionicPlatform, $cordovaFile){ document.addEventListener("deviceready", function () { //When save button is clicked, call this function $scope.save = function() { $cordovaFile.writeFile(cordova.file.dataDirectory,