码迷,mamicode.com
首页 > Web开发 > 详细

vuejs v-for指令

时间:2017-02-07 17:08:23      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:指令   vuejs v-for   

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<title></title>

</head>

<body>

<div id="app">

        <ul>

        <li v-for="todo in todos">

        {{todo.text}}

        </li>

        </ul>

    </div>

<script src="http://static.runoob.com/assets/vue/1.0.11/vue.min.js"></script>

<script>

var vm = new Vue({

el:‘#app‘,

data:{

todos:[

{text:‘Learn JavaScript‘},

{text:‘Learn Vue.js‘},

{text:‘Learn Css‘}

]

}

});

</script>

</body>

</html>


本文出自 “素颜” 博客,请务必保留此出处http://suyanzhu.blog.51cto.com/8050189/1895527

vuejs v-for指令

标签:指令   vuejs v-for   

原文地址:http://suyanzhu.blog.51cto.com/8050189/1895527

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!