Vue.js - The Complete Guide

Section 04: Course Project: The Monster Slayer Game

olivia_yj 2023. 5. 30. 18:03

We can trigger the action directly.

 

We don't have to put the calculation logic in the HTML, instead we can add in the computed.

The difference here is that when we use in HTML, we don't have to call the variable with "this", but here in app.js, we should call with "this".

We use 'watch' to see the flow of the game