title: Angular code gets broken after minified and concated by Ruby on Rails
body: <p>Ruby on Rails framework minifies and concats all files automatically which leads to this error:</p>
  
  <blockquote>
    <p>"Error: [$injector:unpr] Unknown provider: eProvider &lt;- e &lt;-
    DialogCtrl</p>
  </blockquote>
  
  <p>I remember reading somewhere that specific Angular syntax style may break program if minified. I am unsure which part of my code gets broken upon minfy. </p>
  
  <p>This is how my controllers look like: </p>
  
  <pre><code>var AppControllers = angular.module('AppControllers',[]);
  
  AppControllers.controller('MainCtrl',[
    function(){
  }]);
  
  AppControllers.controller('SidebarCtrl', [
    '$scope', '$timeout', '$mdSidenav', '$log', '$http',
    function($scope, $timeout, $mdSidenav, $log, $http){
      $scope.closeNav = function(){
        $mdSidenav('nav').close()
          .then(function(){
            $log.debug("close nav is done");
          });
      };
  }]);
  
  AppControllers.controller('DialogCtrl', function($scope, $mdDialog) {
    $scope.openDialog = function() {
      $mdDialog.show(
        $mdDialog.alert()
          .clickOutsideToClose(true)
          .title('Informacija o podacima')
          .textContent('Navedeni podaci su povijesni. flightmap4.me ne preuzimaju odgovornost za njihovo korištenje prilikom donošenja odluke o rezervaciji ili kupnji aviokarte. Cijena aviokarte ovisi o trenutnoj raspoloživosti na pojedinom letu. Finalna cijena aviokarte vidljiva je na trećem koraku rezervacijskog procesa.')
          .ariaLabel('Info dialog')
          .ok('Zatvori')
          .openFrom('#left')
          .closeTo(angular.element(document.querySelector('#left')))
      );
    };
  });
  </code></pre>
  
  <p>And this is my <code>app.js</code>:</p>
  
  <pre><code>var Flightmap = angular.module('Flightmap', [
    'ngMaterial',
    'AppControllers'
  ]);
  </code></pre>
  
  <p>Which part of my code should I change and how should it look like to make this work as minified?</p>