I have a Rails/AngularJS app which works fine in local development environment. However, when I deploy this app to Heroku the AngularJS doesn't work an returns this error:
Unknown provider: eProvider <- e
I did a bit of research and it seems it has something to do with the precompiling and minification of the assets, but I don't know what to do to solve this. Any ideas? Thanks!
This is how the controller looks:
function RemindersCtrl($scope, $http) {
$http.get('/reminders.json').success(function(data) {
$scope.reminders = data;
console.log(data);
});
}
And this is the code in the view:
%section.reminders
%div{"ng-controller" => "RemindersCtrl"}
%ul
%li{"ng-repeat" => "reminder in reminders"}
.title {{reminder.title}}
Update: I changed the controller to this, but with the same result:
var RemindersCtrl = function($scope, $http) {
$http.get('/reminders.json').success(function(data) {
$scope.reminders = data;
console.log(data);
});
}
RemindersCtrl.$inject = ['$scope','$http'];