I have the following example: http://ift.tt/23cT6YN
The idea of route-action is from @rwjblue.
Clicking ofthe button triggers the delete action on application route. I send a function as a parameter to delete. This should run before the delete happens. So far so good, beforeDelete gets called, now the actual deleting should happen. I pass the performDelete function as a parameter, and it is called.
The problem
When performDelete gets called it loses its context. this points to window. I can not call this.get('foo').
Aucun commentaire:
Enregistrer un commentaire