angular.module( 'countriesCapitalsApp', [ 'countryCapitalsAppViews', 'ngRoute', 'ngAnimate' ])
.config([ '$routeProvider', function( $routeProvider ) {

	$routeProvider
	.when( '/', { templateUrl: 'views/index.html' })
	.otherwise({ redirectTo : '/' });

}])

.run([ '$rootScope', function( $rootScope ) {
	// $rootScope.$on( '$routeChangeError', function() {
	// 	$rootScope.isLoading = false;
	// 	$location.path( '/error' );
	// });

	$rootScope.$on( '$routeChangeStart', function() {
		$rootScope.isLoading = true;
		$rootScope.loadingPercent = 10;
		console.log( 'routeChangeStart', $rootScope.isLoading, $rootScope.loadingPercent );
	});
	$rootScope.$on( '$routeChangeSuccess', function() {
		$rootScope.isLoading = false;
		$rootScope.loadingPercent = 100;
		console.log( 'routeChangeSuccess', $rootScope.isLoading, $rootScope.loadingPercent );
	});

}]);

@@ -550,94 +550,8 @@
 10;%0A
-%09%09console.log( 'routeChangeStart', $rootScope.isLoading, $rootScope.loadingPercent );%0A
 %09%7D);
@@ -675,96 +675,8 @@
 00;%0A
-%09%09console.log( 'routeChangeSuccess', $rootScope.isLoading, $rootScope.loadingPercent );%0A
 %09%7D);

remove console logging