Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

321
Vistas
Form validation with NuxtJS

I'm new to NuxtJS, I was trying to do a simple form to try things out. The idea is that I have a component that contains the full form

<template>
  <div>
    <h1>
      {{ title }}
    </h1>
    <form @submit.prevent="handleSubmit">
      <input type="email" v-model="email" />
      <input type="password" v-model="password" />
      <button type="submit">Sign in</button>
    </form>
  </div>
</template>

<script>
export default {
  data: function() {
    return {
      title: 'Sign in',
      email: null,
      password: null
    }
  },
  methods: {
    handleSubmit: function() {
      console.log('Hello')
    } 
  } 
}
</script>

It's nothing crazy, and then I'm just calling this component in my page

<template>
  <LoginForm />
</template>

<script>

export default {
}
</script>

But when I submit my form I can't see my message in the console, I'm wondering what I did wrong or did I miss something ? Also it is a good practice to make a component like this or should I divide more my component into small one's ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda