i have a {{input}}-helper in my template and i want to fire a method in the controller for every change in the {{input}}-helper.
application.hbs
<div class="page" id="main">
{{input type="text" id="note-title" value=noteTitle action="createNote"}}
</div>
application_controller.js
YeoApp.ApplicationController = Ember.ArrayController.extend({
actions: {
searchTextChanged: function() {
// this method should be called whenever
// the input value changes, but somehow it doesn't work
}.observes("noteTitle"),
anotherMethod: function() {
this.set("noteTitle", "Test!");
//even this doesn't fire the observer when called
}
}
});
Any suggestions? Thanks in advance. Don't be afraid to ask questions.