Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

134
Visualizações
Vue.js not being recognised with CDN

Hi I am currently learning Vue.js and I have an issue with it, I am calling Vue using a CDN.

I have followed instructions but it does not seem to be recognising that Vue exists.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Vue Basics</title>
  <link
    href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap"
    rel="stylesheet"
  />
  <link rel="stylesheet" href="styles.css" />
  <script src="https://unpkg.com/vue@3"></script>

  <script src="app.js" defer></script>
</head>
<body>
  <header>
    <h1>Vue Course Goals</h1>
  </header>
  <section id="user-goal">
    <h2>My Course Goal</h2>
    <p>{{coarseGoal}}</p>
  </section>
</body>
</html>

This is the simple js file It does not output the code from the Vue object.

Would really appreciate any help on this.

const app = vue.createApp({
  data () {
    return {
      coarseGoal: 'This is the best',
    };
  }
});
app.mount('#user-goal');
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

It should be Vue.createApp instead of vue.createApp.

Working Fiddle

const app = Vue.createApp({
  data() {
    return {
      coarseGoal: 'This is the best',

    };
  }
});
app.mount('#user-goal');
<title>Vue Basics</title>
<link href="https://fonts.googleapis.com/css2?family=Jost:wght@400;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="styles.css" />
<script src="https://unpkg.com/vue@3"></script>
<body>
  <header>
    <h1>Vue Course Goals</h1>
  </header>
  <section id="user-goal">
    <h2>My Course Goal</h2>
    <p>{{coarseGoal}}</p>
  </section>
</body>

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda