错误:[ng:areq]参数不是函数,未定义

时间:2015-08-19 07:40:07

标签: javascript ruby-on-rails angularjs coffeescript

我试图用Angular创建一个简单的应用程序,我偶然发现了

enter image description here

加载页面时会弹出错误。我做错了什么?

视图/抽奖/ index.html.erb

<h1>Raffler</h1>

<div ng-controller="RaffleCtrl">
  <form>
    <input type="text" ng-model="newEntry.name">
  </form>

  <ul>
    <li ng-repeat="entry in entries">
     {{entry.name}}
    </li>
  </ul>
</div>

资产/ JavaScript的/ raffle.js.coffee

@RaffleCtrl = ($scope) ->
  $scope.entries = [
    {name: "Larry"}
    {name: "Curly"}
    {name: "Moe"}
  ]  

视图/布局/ application.html.erb

<!DOCTYPE html>
<html ng-app>
<head>
  <title>AngularTestProject</title>
  <%= stylesheet_link_tag    'application', media: 'all', 'data-turbolinks-track' => true %>
  <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
  <%= csrf_meta_tags %>
</head>

<body>
  <div id="container">
    <%= yield %>
  </div>
</body>

</html>

1 个答案:

答案 0 :(得分:1)

你可以,

"**/Test*.java"
"**/*Test.java"
"**/*TestCase.java"

DEMO