Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

371
Views
¿Cómo hacer la aplicación Vue en javascript y hacer que funcione en html?

Hola, estoy tratando de hacer que mi aplicación Vue esté en javascript para que no esté en html. ¿Hay alguna manera de hacer que funcione? Intenté esto:

En HTML:

 <script src="https://cdn.jsdelivr.net/npm/vue"></script> <script src="assets/actions.js" type="text/javascript"></script>

en javascript:

 const AppNotes = Vue.createApp({ data: { newFormtext: "", contents: [ {title: "First Title", contents: ["content1", "content2", "content3"]} ] }, methods: { addNewFormEvent() { this.titles.push(this.formtext) } } }) AppNotes.mount('#content')

pero no funciona en mi html y el texto sigue siendo {{ content.title }}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Aquí hay una plantilla básica de vuejs 2 usando html y javascript, sin node.

Debe llamar al constructor de Vue y establecer el valor de el en alguna identificación de etiqueta.

 new Vue({ el: "#notes-app", data: { counter: 0 }, methods: { increment() { this.counter++; } } });
 <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script> <div id="notes-app"> {{ counter }} <button v-on:click="increment">increment</button> </div>

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!