Integration of Javascript Resources



In ZN Framework vue , react , angularIt is possible to use js libraries like. The remote links for these libraries are in the following configuration file. And you can include the array keys representing these links in the Import :: library.

File:  Settings / CDNLinks.php

 

 

# Example Usage


The following example shows the use of vue .

View: Views / VueExample / main.wizard.php
<html>
<head>
    @Import::script('vue')
    <meta>
        <title>$title</title>,
    </meta>
</head>
<body>
<div id="app-4">
  <ol>
    <li v-for="todo in todos">
      [{ todo.text }]
    </li>
  </ol>
</div>

<script>
var app4 = new Vue
({
    el: '#app-4',
    data:
    {
        todos:
        [
            { text: 'Learn JavaScript' },
            { text: 'Learn Vue' },
            { text: 'Build something awesome' }
        ]
    }
})
</script>
</body>
Caution: Note that in the above example, [{ data }] is used for vue data transmission . Such a use has been made so that ZN does not conflict with the   separator of the template wizard . Of course, this is used as long as the delimiter value of the js library is not changed.