xml
<!--wxml--> <view wx:for="{{array}}"> {{item}} </view>
// page.js
Page({
data: { array: [1, 2, 3, 4, 5] } })
Event binding
<view bindtap='onbind'> I was Event 2 <View catchtap = ' onBind ' > I am the event 1 </ view> </view> onBind: function (event) { console.log ( " Event 1 executed " ) }, onbind: function (event) { console.log ( " Event 2 executed " ) }