我正在发现angularJS
,但我得到一个错误Argument 'LawContrl' is not a function, got undefined
。在我的form
,我在我的 rails 应用程序中
%div{"ng-controller" => "LawContrl"}
=form-for ...
%li{"ng-repeat"=>"entry in entries"} {{entry.name}} //I am using haml file
在我的laws.js.coffee 文件中,我有
@LawContrl = ($scope) ->
$scope.entries = [
{ name: "hi"}
{name: "ho"}
]