I was building a jsfiddle angular app in coffeescript. It failed, and I reduced the failure to this minimal one:
<body ng-app="MyApp">
<div ng-controller="MyController">
{{text}}
</div>
</body>
This javascript fiddle works: http://jsfiddle.net/nje7H/
var app = angular.module("MyApp", []);
app.controller("MyController", function($scope) {
$scope.text = "Hello."
});
However, this coffeescript fiddle fails: http://jsfiddle.net/nje7H/1/
app = angular.module "MyApp", []
app.controller "MyController", ($scope) ->
$scope.text = "Hello."
The console shows "Uncaught Error: No module: MyApp"
Why?