'use strict';
angular.module('subsApp')
.controller('configCtrl',['$scope','$state','Config', function($scope,$state, Config){

	var appConfig = Config.read();

	$scope.languages = [
    {name:'English', value:'eng'},
    {name:'French', value:'fre'},
    {name:'Spanish', value:'spa'},
    {name:'Italian', value:'ita'},
    {name:'German', value:'ger'},
    {name:'Portuguese', value:'por'}
  ];

  $scope.subExtensions = [
    {name:'.srt', value:'srt'},
    {name:'.vtt', value:'vtt'}
  ];

  $scope.language = appConfig.language;
  $scope.subExtension = appConfig.subExtension;

  $scope.save = function(){
  	Config.save($scope.language,$scope.subExtension);
  	$state.go('home');
  };

}]);
@@ -1,8 +1,23 @@
+(function()%7B%0A  
 'use str
@@ -22,16 +22,18 @@
 trict';%0A
+  
 angular.
@@ -50,16 +50,18 @@
 bsApp')%0A
+  
 .control
@@ -140,17 +140,20 @@
 nfig)%7B%0A%0A
-%09
+    
 var appC
@@ -176,17 +176,20 @@
 ead();%0A%0A
-%09
+    
 $scope.l
@@ -201,24 +201,26 @@
 ges = %5B%0A    
+ 
+ 
 %7Bname:'Engli
@@ -238,24 +238,26 @@
 'eng'%7D,%0A    
+  
 %7Bname:'Frenc
@@ -270,24 +270,26 @@
 lue:'fre'%7D,%0A
+  
     %7Bname:'S
@@ -311,24 +311,26 @@
 'spa'%7D,%0A    
+  
 %7Bname:'Itali
@@ -344,24 +344,26 @@
 lue:'ita'%7D,%0A
+  
     %7Bname:'G
@@ -384,24 +384,26 @@
 'ger'%7D,%0A    
+  
 %7Bname:'Portu
@@ -423,24 +423,26 @@
 :'por'%7D%0A
+  
   %5D;%0A%0A  
 $scope.s
@@ -429,24 +429,26 @@
 %7D%0A    %5D;%0A%0A  
+ 
+ 
 $scope.subEx
@@ -456,24 +456,26 @@
 ensions = %5B%0A
+  
     %7Bname:'.
@@ -490,24 +490,26 @@
 lue:'srt'%7D,%0A
+  
     %7Bname:'.
@@ -527,22 +527,26 @@
 :'vtt'%7D%0A
+  
   %5D;%0A%0A
+  
   $scope
@@ -579,16 +579,18 @@
 uage;%0A  
+ 
+ 
 $scope.s
@@ -628,16 +628,18 @@
 nsion;%0A%0A
+  
   $scope
@@ -660,17 +660,20 @@
 on()%7B%0A  
-%09
+    
 Config.s
@@ -720,9 +720,12 @@
 ;%0A  
-%09
+    
 $sta
@@ -743,14 +743,24 @@
 ');%0A
+  
   %7D;%0A%0A
+  
 %7D%5D);
+%0A%7D)();

add anonymus function