Emanuele Tuttolani Emanuele Tuttolani - 2 months ago 12
AngularJS Question

Controller not a function

I started following AngularJS CoffeeScript Style Guide and I'm getting errors about my controller not being a function, what am I doing wrong?

controller.coffee

app.js

Answer

In your controller it should be,

angular.module('realEstate').controller('AggregateController', AggregateController);

Instead of,

 angular.module('app').controller('AggregateController', AggregateController);