html>
list{{ item.message }}
{{index}}:{{ item.message }}
{{ value }}
{{key}}:{{ value }}
var vm = new Vue({
el:"#list",
data: {
items: [
{message: 'Foo' },
{message: 'Bar' }
],
object: {
FirstName: 'John',
LastName: 'Doe',
Age: 30
},
numbers: [ 1, 2, 3, 4, 5 ]
},
computed:{
list:function(){
this.items.push({ message: 'Baz' })
},
evenNumbers: function () {
return this.numbers.filter(function (number) {
return number % 2 === 0
})
}
}
})