我试图用Angular创建一个简单的应用程序,我偶然发现了
加载页面时会弹出错误。我做错了什么?
视图/抽奖/ 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>