How to access data from documentsDirectory in ios ionic app?


#1

How to access data from documentsDirectory in ios ionic app? My code is :

$http.get(cordova.file.documentsDirectory + "test.json").success(function(data){
		$scope.data = data.data;

		if($scope.data.img)
		{
			$scope.headerImage = serverUrl+"/upload/"+$scope.data.img;
		}
		else
		{
			$scope.headerImage = null;
		}
		
		$ionicLoading.hide();	
		});

But not able to get data,Any idea