I have a component that has a text field, like this
<div>
<input type="hidden" name="uid" value=/>
</div>
the component that have this snippet, lives inside a route called room
export default Ember.Route.extend({
model(params){
this.store.findRecord('room', params.uid);
}
});
to handle the action in the input, I created a controller for the room: app/controllers/room.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
postMessage(params){
console.log(params);
}
}
});
but when I hit enter, I get this error:
Uncaught Error: <chathub-ember@component:chat-room::ember1071> had no action handler for: postMessage
I tried to put this action in the route as well and didn't worked
Aucun commentaire:
Enregistrer un commentaire