Loader before loading camera


I need to load a loader before loading the plug-camera. But I have not found a good way. At first I thought of it alone with $ionicLoading.show but it works as I want. I guess the camera plugin is asynchronous and I want to put a loader correctly.


Take a look here. This example uploads the image to a server, but you could take the code you need and do something like this:

$scope.uploadFile = function() {

	Upload.fileTo(<your server api url>).then(
		function(res) {
			// Success
		}, function(err) {
			// Error