// app.js

var Curiosity = angular.module('curiosity', ['elasticsearch', 'ui.select2', 'ui.bootstrap', 'ngAnimate', 'gd.ui.jsonexplorer']);
Curiosity.service('elasticClient', function(esFactory) {
		return { 
			getClient: function(server) {	
          	  return esFactory({
            	    host: server,
            	});
        	}
   		}
   	}
);
// app.js

var Curiosity = angular.module('curiosity', ['elasticsearch', 'ui.select2', 'ui.bootstrap', 'ngAnimate', 'gd.ui.jsonexplorer']);
Curiosity.service('elasticClient', function(esFactory) {
		return { 
			getClient: function(server) {	
          	  return esFactory({
            	    host: server,
            	});
        	}
   		}
   	}
);

// add this to allow controler in custom result template
Curiosity.config(['$controllerProvider', function($controllerProvider) {
  // this option might be handy for migrating old apps, but please don't use it
  // in new ones!
  $controllerProvider.allowGlobals();
}]);

Add parameter to be compatible with old template
Add parameter to be compatible with old template

Since angular 1.3, the global controller constructor are not allowed. https://github.com/angular/angular.js/commit/3f2232b5a181512fac23775b1df4a6ebda67d018
Addition of this code to be compatible with some custom templates.