Post captured picture to second view


#1

hi guys
i need to pass a captured picture to an other view (submission form, with text and image view).
capturing picture goes well, but don’t know how to do the next step.
plz look to :

.controller(‘PostTripCtrl’…

any help?

$scope.takePicture = function() {

	var options =   {
		quality: 50,
		destinationType: destinationType,
		sourceType: pictureSource,
		encodingType: 0
		};
	if (!navigator.camera)
		{
		// error handling
			console.log('pas de caméra');
		return;
		}
	navigator.camera.getPicture(
		function (imageURI) {
				console.log("got camera success ", imageURI);
				$scope.mypicture = imageURI;
				$scope.$apply();
				$state.go('app.posttrip');
			},
		function (err) {
			console.log("got camera error ", err);
			},
		options);
	};

and my “app.posttrip” controller :

.controller('PostTripCtrl', function($scope, $stateParams, $state) {
	$scope.image = $scope.$parent.mypicture;
  	console.log($scope);
})

#2

code here Demo application MyPhotoDiary