[Vuejs]-Vue JS – Changing data in created() and conditional rendering

0πŸ‘

βœ…

The problem is that the value passed as query in the router push is a string, not a boolean, so it always evaluates to true. To fix this, we have to parse the string:

    recibeParametros() {
      this.alumnoIncoming = (this.$route.query.alumnoIncoming === "true");
    },

Leave a comment