The "prod" profile uses JavaScript minification (run by Grunt), which will reduce the size of your JavaScript file. As this modifies your JavaScript code, it can cause issues, depending on how you write your dependency injection code. Have you looked at the sample directives that are provided ? Or at the sample controllers ? You must write your dependency injection in the same style.
For example, to inject the $scope:
jhipsterApp.controller('MainController', ['$scope',
function ($scope) {
}]);
This will ensure the minification process won't break dependency injection of the "$scope" variable.
If you can't make it work, you can also exclude your files from the minification process: it depends on your load, but for most applications this is overkill. This is configured in your Gruntfile.js file.