angular.module('main').controller('ComparisonFilterCtrl', ['$scope', '$route', '$angularCacheFactory', '$backend', 'QueriesService',
  function($scope, $route, $angularCacheFactory, $backend, QueriesService) {
    $scope.service = (new QueriesService($backend.API_URL + '/_queries/public/api'));
    $scope.tags = [];
    $scope.entities = [];
    $scope.years = [];
    $scope.periods = [];

    $backend.getTags().then(function(t) {
        $scope.tags = t;
        $backend.getEntities().then(function(e) {
            $scope.entities = e;
            $backend.getYears().then(function(y) { 
                $scope.years = y;
                $backend.getPeriods().then(function(p) {
                    $scope.periods = p;
                    //focus automatically on last year and FY
                    $scope.selection = $angularCacheFactory.get('secxbrl').get('selection') 
                                    || { entity: [], tag: [ 'DOW30' ], year: [ $scope.years[1] ], period: [ $scope.periods[0] ] };
                });
            });
        });
    });

    $scope.selectEntity = function(entity) { 
        if ($scope.selection.entity.indexOf(entity) < 0)
            $scope.selection.entity.push(entity);
        $scope.name = null;
    };

    $scope.reset = function() { 
        $angularCacheFactory.get('secxbrl').remove('selection');
        $route.reload();
    };

    $scope.$watch(
        function() { return angular.toJson($scope.selection) },
        function() { 
            $angularCacheFactory.get('secxbrl').put('selection', $scope.selection);
            $scope.$emit('filterChanged', $scope.selection); 
        }
    );
  }
]);
@@ -1,16 +1,31 @@
+'use strict';%0A%0A
 angular.module('
@@ -30,16 +30,17 @@
 ('main')
+%0A
 .control
@@ -70,85 +70,8 @@
 rl',
- %5B'$scope', '$route', '$angularCacheFactory', '$backend', 'QueriesService',%0A 
  fun
@@ -521,25 +521,24 @@
 unction(y) %7B
- 
 %0A           
@@ -811,16 +811,18 @@
 ction') 
+%7C%7C
 %0A       
@@ -850,18 +850,19 @@
         
-%7C%7C
+   
  %7B entit
@@ -1047,17 +1047,16 @@
 ntity) %7B
- 
 %0A       
@@ -1104,16 +1104,18 @@
 ty) %3C 0)
+ %7B
 %0A       
@@ -1157,16 +1157,26 @@
 ntity);%0A
+        %7D%0A
         
@@ -1226,33 +1226,32 @@
 t = function() %7B
- 
 %0A        $angula
@@ -1412,16 +1412,17 @@
 lection)
+;
  %7D,%0A    
@@ -1437,17 +1437,16 @@
 tion() %7B
- 
 %0A       
@@ -1582,17 +1582,16 @@
 ection);
- 
 %0A       
@@ -1604,11 +1604,7 @@
  );%0A
-  %7D%0A%5D
+%7D
 );

Fix warnings