Trying to convert working JS to coffee script in my angular app but its raises Error: [ng:areq] Argument 'ContactController' is not a function, got undefined
Here is my code.
angular.module("app", [
"ngResource"
"ngRoute"
]).run ($rootScope) ->
$rootScope.log = (thing) ->
console.log thing
The following js works fine
angular.module("app", ["ngResource", "ngRoute"]).run(function($rootScope) {
$rootScope.log = function(thing) {
console.log(thing);
};
});