.controller("DaftarDPACtrl", function(
ionicSuperPopup,
$ionicModal,
$ionicPopup,
$window,
$ionicActionSheet,
$compile,
$filter,
$timeout,
appService,
$ionicHistory,
$cordovaCamera,
$stateParams,
$ionicLoading,
$rootScope,
$scope,
$state,
AuthenticationService,
Main
) {
if (Main.getSession("token") == null || Main.getSession("token") == undefined) {
$state.go("login");
}
$scope.requestHeader = {};
$scope.detail = {};
$scope.appMode = Main.getAppMode();
$scope.image = "img/placeholder.png";
$scope.requestHeader.images = [];
$scope.requestHeader.imagesData = [];
var messageValidation = "";
$scope.removeChoice = function() {
$("#inputImage").val("");
var lastItem = $scope.requestHeader.imagesData.length - 1;
$scope.requestHeader.imagesData.splice(lastItem);
$scope.requestHeader.images.splice(lastItem);
};
$scope.upload = function() {}
$scope.downloadForm = function() {
$window.open('', '_system', 'location=yes');
};
function initModule() {}
$scope.$on('$ionicView.beforeEnter', function(event, data) {
initModule();
});
})
如何使用js控制器在ionic 1上上传和保存文件到本地目录