[Vuejs]-How to pass parameter to text output in Vue.js 2.x

0๐Ÿ‘

As someone proved via a codepen, my code works. The problem was that before I implemented the translation stuff, I was already using a property message which my endGame() method was trying to fill:

endGame () {
  this.winLoseSymbol = '๐Ÿ˜ก'
  this.message = 'GAME OVER!' // this was the cause of the problem
  this.gamestate = 'lost' 
  this.stopTimer()
}

Since in the new version message is supposed to be a function, overwriting it with a string causes those parts of the application that were using the function to fail.

๐Ÿ‘คconnexo

Leave a comment