I am learning ember.js and I am following this tutorial:
https://youtu.be/owDmPTSJkrg?t=1194
I am writing a controller for a form:
import Controller from '@ember/controller';
export default class TasksNewController extends Controller {
actions:{
addTask: function() {
var title = $this.get('title');
alert(title);
}
}
}
I get this error:
Build Error (broccoli-persistent-filter:Babel > [Babel: emtasks]) in emtasks/controllers/tasks/new.js
/Users/.../Desktop/emtasks/emtasks/controllers/tasks/new.js: Unexpected token (4:11)
2 |
3 | export default class TasksNewController extends Controller {
> 4 | actions:{
| ^
5 | addTask: function() {
6 | var title = $this.get('title');
7 | alert(title);
Thank you for any suggestions
Aucun commentaire:
Enregistrer un commentaire