I'm doing railscast #405 When I runt the following, simple code, I don't get any bound content on screen.
application.html.erb
<!DOCTYPE html>
<html ng-app>
In the index, I want it to show the array of names in the .js file, and have the ability to submit a new name and have it push to the end of the list. index.html.erb
<h1>Sizer</h1>
<div ng-controller="RafflerCtrl">
<form ng-submit="addEntry()">
<input type="text" ng-model="newEntry.name">
<input type="submit" value="Add">
</form>
<ul>
<li ng-repeat="entry in entries">
{{entry.name}}
</li>
</ul>
</div>
Here's the code for my simple (broken) js file. sizer.js.coffee
@RafflerCtrl = ($scope)->
$scope.entries = [
{name: "Bob"}
{name: "Bernie"}
{name: "Terry"}]
$scope.addEntry = ->
$scope.entries.push($scope.newEntry)
$scope.newEntry = {}