One concept of aveon is that the operation data is the operation Dom. This is the most obvious result in collection processing.
A series of methods related to each binding and set accessors.
<P Data-each-method = "methods"> <span data-TEXT = "method"> </span>, </P> <HR/> <ul data-each-El = "list"> <li> <span data-TEXT = "El. title "> </span> <button type =" button "data-on-click =" Remove "> remove </button> </LI> </ul>
Require ("aveon, ready", function ($) {var $ = $. mvvm var VM =$ $. toviewmodel ({Methods: ["push", "unshift", "sort", "reverse", "shift", "pop", "splice", "Remove ", "removeat", "erase", "clear"], list: [{Title: "AAA" },{ title: "BBB" },{ title: "CCC "}, {Title: "DDD"}]}); VM. remove = function (e) {VM. list. erase (E & e.tar get)} $. render (VM) setTimeout (function () {VM. list. push ({Title: "push"}) }, 1000) setTimeout (function () {VM. list. unshift ({Title: "unshift"}) }, 1500) setTimeout (function () {VM. list. splice (1111, {Title: "2222" },{ title: "3333" },{ title: "2000"}) },) setTimeout (function () {VM. list. reverse ()}, 2500 )})
Example
,