@johnunclesam wrote:
I'm in a route called "game".
In an action I call Ember.run.debounce for a function, but in that function I can't call other functions.
app/routes/game.js:
import Ember from 'ember'; export default Ember.Route.extend({ model() { ... }, saveGame: function () { this.save().then(() => { this.updateOtherGames(); //<------ ERROR ERROR ERROR ERROR }) }, updateOtherGames(game) { }, actions: { playGame(game) { ... Ember.run.debounce(game, this.saveGame, 5000); } } })Why I can't call
updateOtherGames?Why
thisin thesaveGamefunction is only referring togamend not the route?
Posts: 6
Participants: 3