Skip to content

Quick Start

ReactMVC edited this page Jul 1, 2023 · 7 revisions

HTML

Create an html file and attach the library file to it.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home</title>
</head>
<body>
    
    <script src="Elroid.js"></script>
</body>
</html>

And then write your first code. or with the help of a javascript file or within the html itself.

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home</title>
</head>

<body>
    <div id="app">
        <h1>{{ title }}</h1>
    </div>


    <script src="Elroid.js"></script>

    <script>
        const App = new Elroid({
            el: "#app",
            data: {
                title: "Home"
            }
        });
    </script>
</body>

</html>

Javascript

index.html

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

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Home</title>
</head>

<body>
    <div id="app">
        <h1>{{ title }}</h1>
    </div>


    <script src="Elroid.js"></script>
    <script src="App.js"></script>
</body>

</html>

App.js

const App = new Elroid({
    el: "#app",
    data: {
        title: "Home"
    }
});

Next: Simple syntax

Clone this wiki locally