<div class="text1" ms-if="el.id!=0">if 的內(nèi)容</div>
<div class="text1" ms-if="el.id!=1">else 的內(nèi)容</div>
整體代碼
<div class="row" ms-controller="userInfo">
<div class="col-md-4" ms-for="el in @obj">
<ul class="list-group" ms-if="el.id==1">
<li class="list-group-item" ms-click="@addClick">{{el.id}}</li>
<li class="list-group-item">{{el.name}}</li>
<li class="list-group-item">{{el.email}}</li>
</ul>
<ul class="list-group" ms-if="el.id!=1">
<li class="list-group-item" ms-click="@addClick" style="background-color: aqua">{{el.id}}</li>
<li class="list-group-item">{{el.name}}</li>
<li class="list-group-item">{{el.email}}</li>
</ul>
<p><a class="btn btn-default" href="#" role="button">View details ?</a></p>
</div>
</div>