Hey could you please help me with this... No matter whether i use local image or remote image it always tells me language parameter is missing. Even i dont enter an image url thats the error it gives me.
Please help, my code is below.
mainApp.controller('RegisterCtrl1', function($scope, $timeout, $state, $ionicLoading, $cordovaCamera, $http) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//$scope.$on('$ionicView.enter', function(e) {
//});
// Form data for the login modal
$scope.registerData = {
};
$scope.takePicture = function() {
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
sourceType : Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.FILE_URI });
console.log("Take Picture Working");
}
function successCallback (result) {
alert("Success :" + result);
}
function errorCallback (error) {
alert("Error :" + error);
}
function onSuccess(imageURI) {
alert(imageURI);
var requestParams = {
image : "https://pbs.twimg.com/media/BblNFPTCEAAvPZL.jpg",
language : "en",
apikey : "I DELETED THIS KEY"
}
console.log(requestParams);
$http.post('http://api.ocrapiservice.com/1.0/rest/ocr', requestParams)
.success(function(results){
console.log("OCR Response ", results);
})
.error(function(error){
console.log(error);
});
// ocrapiservice.convert( successCallback, errorCallback, imageURI, "en", "xB4FdPW4uU" );
}
function onFail(message) {
alert('Failed because: ' + message);
}
// Perform the login action when the user submits the login form
$scope.checkUser = function() {
console.log('Doing User Checking 1 ', $scope.registerData);
$ionicLoading.show({
template: '
Checking User Info... Please Wait!!!
',
animation: 'fade-in',
showBackdrop: true,
maxWidth: 200,
showDelay: 0
});
$timeout(function() {
$ionicLoading.hide();
$state.go('app2.register2');
}, 5000);
};
});
Hey could you please help me with this... No matter whether i use local image or remote image it always tells me language parameter is missing. Even i dont enter an image url thats the error it gives me.
Please help, my code is below.
mainApp.controller('RegisterCtrl1', function($scope, $timeout, $state, $ionicLoading, $cordovaCamera, $http) {
// With the new view caching in Ionic, Controllers are only called
// when they are recreated or on app start, instead of every page change.
// To listen for when this page is active (for example, to refresh data),
// listen for the $ionicView.enter event:
//$scope.$on('$ionicView.enter', function(e) {
//});
// Form data for the login modal
$scope.registerData = {
};
$scope.takePicture = function() {
navigator.camera.getPicture(onSuccess, onFail, { quality: 50,
sourceType : Camera.PictureSourceType.CAMERA,
destinationType: Camera.DestinationType.FILE_URI });
console.log("Take Picture Working");
}
function successCallback (result) {
alert("Success :" + result);
}
function errorCallback (error) {
alert("Error :" + error);
}
function onSuccess(imageURI) {
alert(imageURI);
var requestParams = {
image : "https://pbs.twimg.com/media/BblNFPTCEAAvPZL.jpg",
language : "en",
apikey : "I DELETED THIS KEY"
}
console.log(requestParams);
$http.post('http://api.ocrapiservice.com/1.0/rest/ocr', requestParams)
.success(function(results){
console.log("OCR Response ", results);
})
.error(function(error){
console.log(error);
});
// ocrapiservice.convert( successCallback, errorCallback, imageURI, "en", "xB4FdPW4uU" );
}
function onFail(message) {
alert('Failed because: ' + message);
}
// Perform the login action when the user submits the login form
$scope.checkUser = function() {
console.log('Doing User Checking 1 ', $scope.registerData);
$ionicLoading.show({
template: '
Checking User Info... Please Wait!!!
',animation: 'fade-in',
showBackdrop: true,
maxWidth: 200,
showDelay: 0
});
$timeout(function() {
$ionicLoading.hide();
$state.go('app2.register2');
}, 5000);
};
});