title: How to correctly minify angularJS file
body: <p>I have a simple angularjs directive and when I minify the file i get error because the variable names are changed</p>
  
  <pre><code>var app= angular.module('app',[]);
  
  app.directive('directive',function(){
      return {
          restrict: 'EA',
          scope: {},
          replace: true,
          link: function($scope, element, attributes){
              $scope.name="test-test";
          ,
          controller: function($scope,$attrs,$http){
  
          },
          templateUrl: 'directives/app/app.tpl.html'
      }
  });
  </code></pre>
  
  <p>the problem is $scope.name changes into a.name and angular doesn't recognize it. 
  I tried injecting $scope by trying something like</p>
  
  <pre><code>link: ['$scope',function($scope, element, attributes){
              $scope.name="test-test";
  }],
  controller: ['$scope','$attrs','$http',function($scope,$attrs,$http){
  
  }],
  </code></pre>
  
  <p>but I still get the same error of a.name when minified.</p>