title: Is there a way to prevent some variables being renamed via asp.net System.Web.Optimization
body: <p>I'm using ASP.Net bundling &amp; minification (<code>System.Web.Optimization</code>) in an AngularJS project.</p>
  
  <p>Everything works perfectly well apart from one scenario.</p>
  
  <p>We have to, at this time, <code>eval()</code> an expression. We know it's not ideal though at this time there isn't another solution to fit our needs.</p>
  
  <p>So we have this line:</p>
  
  <pre><code>var isValid = eval('globalJson.Permissions.' + attrs.drHasPermissionFor);
  </code></pre>
  
  <p>Now, because minification has changed the name of our variables etc <code>globalJson</code> doesn't exist, so this line fails.</p>
  
  <p>Is there a way to instruct ASP.Net Minification to <strong><em>not</em></strong> rename specific variables?</p>
  
  <p><strong>Update</strong></p>
  
  <p>Following on from the answer given - we already to use Angulars safe way to inject.</p>
  
  <p>The directive where this is being used, looks like this:</p>
  
  <pre><code>    appDirectives.directive('drHasPermissionFor', ['globalJson', function (globalJson) {
          return {
              restrict: 'A',
              link: function (scope, element, attrs) {
                  //code .....
  
                  // how can I reference the injected globalJson here - so that i know it's using the
                  // newly minified name..
                  var isValid = eval('globalJson.Permissions.' + attrs.drHasPermissionFor);
  
  //more code......
              }
          };
      }]);
  </code></pre>