SoFunction
Updated on 2025-04-04

Simple vue-resourse to get json and apply to template example

Don't talk nonsense and code:

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

  <head>
    <meta charset="UTF-8">
    <title>vue js</title>
    <style>
      .completed {
        text-decoration: line-through;
      }
      
      .something {
        color: red;
      }
    </style>
  </head>

  <body>

    <div class="container">
      <div >
        <task-app :list="tasks">

        </task-app>
      </div>
      <template >
        <ul>
          <li v-for="task in list">
            {{  }} | {{  }} | {{  }} | {{  }}
          </li>
        </ul>
      </template>
      <script src=""></script>
      <script src=""></script>

      <script>
        ('task-app', {//Tags to be applied          template: '#task-template',//Template id props: ['list']//Requested json        })
      </script>
      <script>
        var demo = new Vue({
          el: '#app',
          data: {
            tasks: '' //It is empty, it can be null          },
          ready: function() {
            ()
          },
          methods: {
            getCustomers: function() {
              this.$('')
                .then(function(response) { //Response parameter can be any value                  this.$set('tasks', )
                })
                .catch(function(response) {
                  (response)
                })
            }
          }
        })
      </script>
  </body>

</html>

The above is all the content of this article. I hope it will be helpful to everyone's study and I hope everyone will support me more.