Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

FileSystem problem - cordova Ionic Application

$
0
0

I test with firefox or chrome.
I do:> Ionic serve

I just tested:

 Error: cordova is not defined

code :

app.controller('AddCtrl', function($scope, $cordovaFile, $location, $ionicPlatform) {

      $ionicPlatform.ready(function() {
        $scope.addAss = function () {

      $cordovaFile.createFile(cordova.file.dataDirectory, "new_file.txt", true)
        .then(function (success) {
          alert('ok1');
        }, function (error) {
          alert('ok2');
        });

      };

      });
});

Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>