dimanche 6 janvier 2019

How to mount riot tags inside a laravel project

I need to add riot js to my laravel project and not sure I am doing the correct way to integrate riot for laravel project.

I have tried as follows in the blade.php file which is in the laravel views folder.

<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <title>Laravel</title>

    <!-- Fonts -->
    <link
        href="https://fonts.googleapis.com/css?family=Nunito:200,600"
        rel="stylesheet"
        type="text/css"
    />
    <script src="../js/riotcompiler.js" type="riot/tag"></script>
</head>
<body>
    <hello></hello>
    <script src="../tags/hello.tag" type="tag"></script>
    <script>
        riot.mount("hello");
    </script>
    njk
</body>
</html>

Then when I run the laravel project it will generate an exception saying riot is not defined. But I have already installed riot globally. So how can I fix this issue?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2F9yq0f
via IFTTT

Aucun commentaire:

Enregistrer un commentaire