vuejs
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
List Rendering 43<br />
29 })<br />
30<br />
31 new Vue({<br />
32 el: '.container',<br />
33 data: {<br />
34 stories: [<br />
35 {<br />
36 plot: "I crashed my car today!",<br />
37 writer: "Alex",<br />
38 upvotes: 28<br />
39 },<br />
40 {<br />
41 plot: "Yesterday, someone stole my bag!",<br />
42 writer: "John",<br />
43 upvotes: 8<br />
44 },<br />
45 {<br />
46 plot: "Someone ate my chocolate...",<br />
47 writer: "John",<br />
48 upvotes: 51<br />
49 },<br />
50 {<br />
51 plot: "I ate someone's chocolate!",<br />
52 writer: "Alex",<br />
53 upvotes: 74<br />
54 },<br />
55 ]<br />
56 }<br />
57 })<br />
58 <br />
59 <br />
Info<br />
Our famous filter uses javascript’s filter method.⁴ The filter() method creates a new<br />
array with all elements that pass the test implemented by the provided function.<br />
⁴https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/filter