I'm following a tutorial that is about a year old so there is some syntax that has been depreciated. I type some text in an input field and hit enter. I should see an alert box pop up with the text I've just written. Instead, when I load the page and look at the console, I immediately get this error:
Uncaught SyntaxError: missing ) after argument list
It says I have an error in my controller but there doesn't seem to be any syntax problems in my code.
When I type and hit enter, there is no alert box and an error on the console says:
Uncaught Error: Nothing handled the action 'addEntry'. If you did handle the action, this error can be caused by returning true from an action handler in a controller, causing the action to bubble.
My application template looks like this:
<div id = "container">
<h1>Emberails</h1>
</div>
My ApplicationController looks like this:
Emberapp.ApplicationController << Ember.Controller.extend(
addEntry: function(){
alert(this.get('newEntryName'));
this.set('newEntryName', "");
}
)
Appreciate any help on this.
Aucun commentaire:
Enregistrer un commentaire