title: Require AngularJs controller with webpack
body: <p>I am trying to use webpack with angularjs but can't make my controller work, when I try to require it and run it getting this error: <code>__webpack_require__(...) is not a function</code>. Below is my app.js and controller code:</p>
  
  <pre><code>//app.js
  var angular = require('angular');
  var weatherModule = angular.module('weather', []);
  
  require('./shared/directives/app.directives')(weatherModule);
  require('./weather/weather.controller')(weatherModule);
  
  //weather.controller.js
  module.export = function(weatherModule) {
      weatherModule.controller('WeatherCtrl', ['$scope', function($scope){
          $scope.greetings = 'Hey from controller';
      }]);
  }
  </code></pre>
  
  <p>If I directly write controller code in app.js itself that works fine like: <code>weatherModule.controller('WeatherCtrl', ['$scope', function($scope){}])</code></p>