Vue html elements not showing correct output

I am following microsoft online Vue tuturial. But following code should be outputting as below html page: enter image description here

But I am getting this as output not sure why. Why productName and productDescription are not appearing as string values? enter image description here index.js:

const app = Vue.createApp({
    data() {
        return {
            productName: 'Book a Cruise to the Moon',
            productDescription: 'Cruise to the moon in our luxurious shuttle. Watch the astronauts working outside the International Space Station.',
            // additional properties later


        };
    },
});

index.html:

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <title>Relecloud Galaxy Tours</title>
    <link rel="stylesheet" href="./assets/styles.css" />
    <!-- TODO: Import Vue.js core library -->
    <script src="https://unpkg.com/vue@next"></script>
</head>

<body>
    <div class="nav-bar"></div>
    <h1>Relecloud Galaxy Tours</h1>

    <!-- TODO: Add information display -->
    <div id="app">
        <h2></h2>
        <div></div>
    </div>

    
    <!-- TODO: Import Vue app -->
    <script src="./index.js"></script>
    <script>
        app.mount('#app');
    </script>

</body>

</html>


Comments

Popular posts from this blog

Today Walkin 14th-Sept

Hibernate Search - Elasticsearch with JSON manipulation

Spring Elasticsearch Operations